X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fconnector.cpp;h=9915ecc19d8df6291f87c0d84350990d8a2847e8;hb=8dcc2c95d8d51d7a27b423343eeaac15ca3c6dec;hp=690a57bc21bb553e05b249905b4bf5b39ef20ae3;hpb=0af3c2393bd00f39db3bfaf5b78a7a44f0fd5ff1;p=libs%2Fgltk.git diff --git a/source/connector.cpp b/source/connector.cpp index 690a57b..9915ecc 100644 --- a/source/connector.cpp +++ b/source/connector.cpp @@ -1,10 +1,4 @@ -/* $Id$ - -This file is part of libmspgltk -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - +#include #include "connector.h" #include "logic.h" @@ -25,11 +19,8 @@ void Connector::connect(const Logic &logic) for(list::const_iterator i=logic_binds.begin(); i!=logic_binds.end(); ++i) { - map::const_iterator j = actions.find(i->type); - if(j!=actions.end()) - j->second->connect(*this, *i->wdg, i->data); - else - throw KeyError("Unknown binding type", i->type); + ConnAction *action = get_item(actions, i->type); + action->connect(*this, *i->wdg, i->data); } }