aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Keys.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index a9a5ad2..58beee7 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);
@@ -237,7 +237,7 @@ int Keys::t_key::newindex(lua::state *l) {
237 k2->isdouble = t->isdouble; 237 k2->isdouble = t->isdouble;
238 *p.first = k2; 238 *p.first = k2;
239 } else 239 } else
240 p.second.keylist.erase(p.first); 240 p.second->keylist.erase(p.first);
241 } 241 }
242 catch(std::runtime_error &e) { 242 catch(std::runtime_error &e) {
243 cerr << "keymode newindex: " << e.what() << endl; 243 cerr << "keymode newindex: " << e.what() << endl;
@@ -274,7 +274,7 @@ int Keys::t_key::index(lua::state *l) {
274 FbTk::StringUtil::stringtok(val, str.c_str()); 274 FbTk::StringUtil::stringtok(val, str.c_str());
275 275
276 FindPair p = k->findBinding(val, false); 276 FindPair p = k->findBinding(val, false);
277 if(p.first == p.second.keylist.end()) 277 if(p.first == p.second->keylist.end())
278 l->pushnil(); 278 l->pushnil();
279 else { 279 else {
280 l->createuserdata<RefKey>(*p.first); { 280 l->createuserdata<RefKey>(*p.first); {
@@ -452,7 +452,7 @@ Keys::t_key::FindPair Keys::t_key::findBinding(vector<string> val, bool insert )
452 new_it = keylist.insert(new_it, new_key); 452 new_it = keylist.insert(new_it, new_key);
453 453
454 if(new_it == keylist.end() || val.empty()) 454 if(new_it == keylist.end() || val.empty())
455 return FindPair(new_it, *this); 455 return FindPair(new_it, this);
456 else 456 else
457 return (*new_it)->findBinding(val, insert); 457 return (*new_it)->findBinding(val, insert);
458} 458}