Changeset 10768 for code/branches/cpp11_v2/src/libraries/core/input
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/input
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/Button.cc
r9983 r10768 53 53 Button::Button() 54 54 : bButtonThresholdUser_(false) 55 , paramCommandBuffer_( 0)55 , paramCommandBuffer_(nullptr) 56 56 { 57 57 nCommands_[0]=0; … … 75 75 delete commands_[j][i]; 76 76 delete[] commands_[j]; 77 commands_[j] = 0;77 commands_[j] = nullptr; 78 78 nCommands_[j] = 0; 79 79 } … … 206 206 } 207 207 } 208 if (cmd->paramCommand_ == 0)208 if (cmd->paramCommand_ == nullptr) 209 209 { 210 210 cmd->paramCommand_ = new BufferedParamCommand(); … … 239 239 } 240 240 else 241 commands_[j] = 0;241 commands_[j] = nullptr; 242 242 } 243 243 } -
code/branches/cpp11_v2/src/libraries/core/input/HalfAxis.h
r7859 r10768 49 49 : relVal_(0.0f) 50 50 , absVal_(0.0f) 51 , paramCommands_( 0)51 , paramCommands_(nullptr) 52 52 , nParamCommands_(0) 53 53 , pressed_(false) -
code/branches/cpp11_v2/src/libraries/core/input/InputCommands.h
r9978 r10768 103 103 { 104 104 public: 105 ParamCommand() : scale_(1.0f), paramCommand_( 0) { }105 ParamCommand() : scale_(1.0f), paramCommand_(nullptr) { } 106 106 bool execute(float abs = 1.0f, float rel = 1.0f); 107 107 CommandEvaluation* getEvaluation(); … … 118 118 return &this->paramCommand_->evaluation_; 119 119 else 120 return 0;120 return nullptr; 121 121 } 122 122 } -
code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
r10765 r10768 72 72 InputHandler InputHandler::EMPTY; 73 73 74 InputManager* InputManager::singletonPtr_s = 0;74 InputManager* InputManager::singletonPtr_s = nullptr; 75 75 76 76 //! Defines the |= operator for easier use. … … 94 94 InputManager::InputManager() 95 95 : internalState_(Bad) 96 , oisInputManager_( 0)96 , oisInputManager_(nullptr) 97 97 , devices_(2) 98 98 , exclusiveMouse_(false) 99 , emptyState_( 0)100 , calibratorCallbackHandler_( 0)99 , emptyState_(nullptr) 100 , calibratorCallbackHandler_(nullptr) 101 101 { 102 102 RegisterObject(InputManager); … … 149 149 // When loading the devices they should not already be loaded 150 150 assert(internalState_ & Bad); 151 assert(devices_[InputDeviceEnumerator::Mouse] == 0);152 assert(devices_[InputDeviceEnumerator::Keyboard] == 0);151 assert(devices_[InputDeviceEnumerator::Mouse] == nullptr); 152 assert(devices_[InputDeviceEnumerator::Keyboard] == nullptr); 153 153 assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick); 154 154 … … 294 294 295 295 // Reset console commands 296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject( 0);297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject( 0);296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(nullptr); 297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(nullptr); 298 298 299 299 orxout(internal_status, context::input) << "InputManager: Destruction complete." << endl; … … 316 316 const std::string& className = device->getClassName(); 317 317 delete device; 318 device = 0;318 device = nullptr; 319 319 orxout(verbose, context::input) << className << " destroyed." << endl; 320 320 } … … 526 526 { 527 527 if (name.empty()) 528 return 0;528 return nullptr; 529 529 if (statesByName_.find(name) == statesByName_.end()) 530 530 { … … 539 539 orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '" 540 540 << static_cast<int>(priority) << "' != 0." << endl; 541 return 0;541 return nullptr; 542 542 } 543 543 } … … 551 551 { 552 552 orxout(internal_warning, context::input) << "Could not add an InputState with the same name '" << name << "'." << endl; 553 return 0;553 return nullptr; 554 554 } 555 555 } … … 561 561 return it->second; 562 562 else 563 return 0;563 return nullptr; 564 564 } 565 565 -
code/branches/cpp11_v2/src/libraries/core/input/InputState.cc
r10765 r10768 40 40 , bExpired_(true) 41 41 , handlers_(2) 42 , joyStickHandlerAll_( 0)43 , enterFunctor_( 0)44 , leaveFunctor_( 0)42 , joyStickHandlerAll_(nullptr) 43 , enterFunctor_(nullptr) 44 , leaveFunctor_(nullptr) 45 45 { 46 46 if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty) -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
r10765 r10768 439 439 { 440 440 delete[] button->commands_[mode_index]; 441 button->commands_[mode_index] = 0;441 button->commands_[mode_index] = nullptr; 442 442 } 443 443 -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
r10765 r10768 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 -
code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc
r10624 r10768 68 68 { 69 69 #ifdef ORXONOX_PLATFORM_LINUX 70 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject( 0);71 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject( 0);70 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(nullptr); 71 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(nullptr); 72 72 #endif 73 73 }
Note: See TracChangeset
for help on using the changeset viewer.