diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-08-11 11:55:45 (GMT) |
---|---|---|
committer | Paul Tagliamonte <paultag@fluxbox.org> | 2012-04-07 02:13:13 (GMT) |
commit | 10854cc262fa243d948477e715d03ede5765a405 (patch) | |
tree | 788d789fe5c74c0735eae4ec69c81b1c36bb8a08 | |
parent | 657eb02f063fe6d046cefaecc5982b0b5ae35bf6 (diff) | |
download | fluxbox_paul-10854cc262fa243d948477e715d03ede5765a405.zip fluxbox_paul-10854cc262fa243d948477e715d03ede5765a405.tar.bz2 |
small gcc 4.1 compatibility fix
-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 081ed8d..28692ad 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); { |
@@ -458,7 +458,7 @@ Keys::t_key::FindPair Keys::t_key::findBinding(vector<string> val, bool insert ) | |||
458 | new_it = keylist.insert(new_it, new_key); | 458 | new_it = keylist.insert(new_it, new_key); |
459 | 459 | ||
460 | if(new_it == keylist.end() || val.empty()) | 460 | if(new_it == keylist.end() || val.empty()) |
461 | return FindPair(new_it, *this); | 461 | return FindPair(new_it, this); |
462 | else | 462 | else |
463 | return (*new_it)->findBinding(val, insert); | 463 | return (*new_it)->findBinding(val, insert); |
464 | } | 464 | } |