From 10854cc262fa243d948477e715d03ede5765a405 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Thu, 11 Aug 2011 13:55:45 +0200 Subject: small gcc 4.1 compatibility fix --- src/Keys.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Keys.cc b/src/Keys.cc index 081ed8d..28692ad 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -142,7 +142,7 @@ public: // typedefs typedef std::list keylist_t; - typedef std::pair FindPair; + typedef std::pair FindPair; static void initKeys(FbTk::Lua &l); static int addBinding(lua::state *l); @@ -239,7 +239,7 @@ int Keys::t_key::newindex(lua::state *l) { k2->isdouble = t->isdouble; *p.first = k2; } else - p.second.keylist.erase(p.first); + p.second->keylist.erase(p.first); } catch(std::runtime_error &e) { cerr << "keymode newindex: " << e.what() << endl; @@ -276,7 +276,7 @@ int Keys::t_key::index(lua::state *l) { FbTk::StringUtil::stringtok(val, str.c_str()); FindPair p = k->findBinding(val, false); - if(p.first == p.second.keylist.end()) + if(p.first == p.second->keylist.end()) l->pushnil(); else { l->createuserdata(*p.first); { @@ -458,7 +458,7 @@ Keys::t_key::FindPair Keys::t_key::findBinding(vector val, bool insert ) new_it = keylist.insert(new_it, new_key); if(new_it == keylist.end() || val.empty()) - return FindPair(new_it, *this); + return FindPair(new_it, this); else return (*new_it)->findBinding(val, insert); } -- cgit v0.11.2