aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-08-11 11:55:45 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 10:04:02 (GMT)
commitcfe61281d35193be6588c9b32b200cf0d4d55968 (patch)
tree3bfd6e77e0338d1b3f13523846e94c459e3ce922
parent7a0a87b10174f2d546d96268cd63d91e7f0ae693 (diff)
downloadfluxbox_pavel-cfe61281d35193be6588c9b32b200cf0d4d55968.zip
fluxbox_pavel-cfe61281d35193be6588c9b32b200cf0d4d55968.tar.bz2
small gcc 4.1 compatibility fix
-rw-r--r--src/Keys.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index 66d0476..25307f4 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}