- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
r10624 r10765 210 210 catch (const std::exception& ex) 211 211 { 212 oisInputManager_ = NULL;212 oisInputManager_ = nullptr; 213 213 internalState_ |= Bad; 214 214 ThrowException(InitialisationFailed, "Could not initialise the input system: " << ex.what()); … … 312 312 BOOST_FOREACH(InputDevice*& device, devices_) 313 313 { 314 if (device == NULL)314 if (device == nullptr) 315 315 continue; 316 316 const std::string& className = device->getClassName(); … … 321 321 devices_.resize(InputDeviceEnumerator::FirstJoyStick); 322 322 323 assert(oisInputManager_ != NULL);323 assert(oisInputManager_ != nullptr); 324 324 try 325 325 { … … 331 331 << "Potential resource leak!" << endl; 332 332 } 333 oisInputManager_ = NULL;333 oisInputManager_ = nullptr; 334 334 335 335 internalState_ |= Bad; … … 388 388 // No event gets triggered here yet! 389 389 BOOST_FOREACH(InputDevice* device, devices_) 390 if (device != NULL)390 if (device != nullptr) 391 391 device->update(time); 392 392 … … 419 419 for (unsigned int i = 0; i < devices_.size(); ++i) 420 420 { 421 if (devices_[i] == NULL)421 if (devices_[i] == nullptr) 422 422 continue; 423 423 std::vector<InputState*>& states = devices_[i]->getStateListRef(); … … 439 439 std::set<InputState*> tempSet; 440 440 for (unsigned int i = 0; i < devices_.size(); ++i) 441 if (devices_[i] != NULL)441 if (devices_[i] != nullptr) 442 442 for (unsigned int iState = 0; iState < devices_[i]->getStateListRef().size(); ++iState) 443 443 tempSet.insert(devices_[i]->getStateListRef()[iState]); … … 467 467 { 468 468 BOOST_FOREACH(InputDevice* device, devices_) 469 if (device != NULL)469 if (device != nullptr) 470 470 device->clearBuffers(); 471 471 } … … 477 477 478 478 BOOST_FOREACH(InputDevice* device, devices_) 479 if (device != NULL)479 if (device != nullptr) 480 480 device->startCalibration(); 481 481 … … 488 488 { 489 489 BOOST_FOREACH(InputDevice* device, devices_) 490 if (device != NULL)490 if (device != nullptr) 491 491 device->stopCalibration(); 492 492 … … 509 509 { 510 510 Mouse* mouse = static_cast<Mouse*>(devices_[InputDeviceEnumerator::Mouse]); 511 if (mouse != NULL)511 if (mouse != nullptr) 512 512 { 513 513 const OIS::MouseState state = mouse->getOISDevice()->getMouseState();
Note: See TracChangeset
for help on using the changeset viewer.