Changeset 11071 for code/trunk/src/libraries/core/input/KeyBinderManager.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (9 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/input/KeyBinderManager.cc
r10624 r11071 56 56 57 57 KeyBinderManager::KeyBinderManager() 58 : currentBinder_( NULL)58 : currentBinder_(nullptr) 59 59 , bDefaultFileLoaded_(true) 60 60 , bBinding_(false) … … 76 76 { 77 77 // Delete all remaining KeyBinders 78 for ( std::map<std::string, KeyBinder*>::const_iterator it = this->binders_.begin(); it != this->binders_.end(); ++it)79 delete it->second;78 for (const auto& mapEntry : this->binders_) 79 delete mapEntry.second; 80 80 81 81 // Reset console commands 82 ModifyConsoleCommand(__CC_keybind_name ).setObject( 0);83 ModifyConsoleCommand(__CC_tkeybind_name).setObject( 0);84 ModifyConsoleCommand(__CC_unbind_name ).setObject( 0);85 ModifyConsoleCommand(__CC_tunbind_name ).setObject( 0);82 ModifyConsoleCommand(__CC_keybind_name ).setObject(nullptr); 83 ModifyConsoleCommand(__CC_tkeybind_name).setObject(nullptr); 84 ModifyConsoleCommand(__CC_unbind_name ).setObject(nullptr); 85 ModifyConsoleCommand(__CC_tunbind_name ).setObject(nullptr); 86 86 } 87 87 … … 205 205 void KeyBinderManager::registerKeybindCallback(LuaFunctor* function) 206 206 { 207 this->callbackFunction_ = function;207 this->callbackFunction_.reset(function); 208 208 } 209 209 }
Note: See TracChangeset
for help on using the changeset viewer.