From c8a9f3ed555c760c42e8993fd975cc29f894e2f1 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 a9a5ad2..58beee7 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); @@ -237,7 +237,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; @@ -274,7 +274,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); { @@ -452,7 +452,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