From 90ac46516c4d88b3d9501a2378397c8eb5a6ec27 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 6b7e343..5149bc5 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); { @@ -460,7 +460,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