diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Keys.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Keys.cc b/src/Keys.cc index 6b7e343..5149bc5 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -142,7 +142,7 @@ public: | |||
142 | 142 | ||
143 | // typedefs | 143 | // typedefs |
144 | typedef std::list<RefKey> keylist_t; | 144 | typedef std::list<RefKey> keylist_t; |
145 | typedef std::pair<keylist_t::iterator, t_key &> FindPair; | 145 | typedef std::pair<keylist_t::iterator, t_key *> FindPair; |
146 | 146 | ||
147 | static void initKeys(FbTk::Lua &l); | 147 | static void initKeys(FbTk::Lua &l); |
148 | static int addBinding(lua::state *l); | 148 | static int addBinding(lua::state *l); |
@@ -239,7 +239,7 @@ int Keys::t_key::newindex(lua::state *l) { | |||
239 | k2->isdouble = t->isdouble; | 239 | k2->isdouble = t->isdouble; |
240 | *p.first = k2; | 240 | *p.first = k2; |
241 | } else | 241 | } else |
242 | p.second.keylist.erase(p.first); | 242 | p.second->keylist.erase(p.first); |
243 | } | 243 | } |
244 | catch(std::runtime_error &e) { | 244 | catch(std::runtime_error &e) { |
245 | cerr << "keymode newindex: " << e.what() << endl; | 245 | cerr << "keymode newindex: " << e.what() << endl; |
@@ -276,7 +276,7 @@ int Keys::t_key::index(lua::state *l) { | |||
276 | FbTk::StringUtil::stringtok(val, str.c_str()); | 276 | FbTk::StringUtil::stringtok(val, str.c_str()); |
277 | 277 | ||
278 | FindPair p = k->findBinding(val, false); | 278 | FindPair p = k->findBinding(val, false); |
279 | if(p.first == p.second.keylist.end()) | 279 | if(p.first == p.second->keylist.end()) |
280 | l->pushnil(); | 280 | l->pushnil(); |
281 | else { | 281 | else { |
282 | l->createuserdata<RefKey>(*p.first); { | 282 | l->createuserdata<RefKey>(*p.first); { |
@@ -460,7 +460,7 @@ Keys::t_key::FindPair Keys::t_key::findBinding(vector<string> val, bool insert ) | |||
460 | new_it = keylist.insert(new_it, new_key); | 460 | new_it = keylist.insert(new_it, new_key); |
461 | 461 | ||
462 | if(new_it == keylist.end() || val.empty()) | 462 | if(new_it == keylist.end() || val.empty()) |
463 | return FindPair(new_it, *this); | 463 | return FindPair(new_it, this); |
464 | else | 464 | else |
465 | return (*new_it)->findBinding(val, insert); | 465 | return (*new_it)->findBinding(val, insert); |
466 | } | 466 | } |