Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 6, 2015, 10:54:34 PM (8 years ago)
Author:
landauf
Message:

replace '0' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc

    r10765 r10768  
    7272    InputHandler InputHandler::EMPTY;
    7373
    74     InputManager* InputManager::singletonPtr_s = 0;
     74    InputManager* InputManager::singletonPtr_s = nullptr;
    7575
    7676    //! Defines the |= operator for easier use.
     
    9494    InputManager::InputManager()
    9595        : internalState_(Bad)
    96         , oisInputManager_(0)
     96        , oisInputManager_(nullptr)
    9797        , devices_(2)
    9898        , exclusiveMouse_(false)
    99         , emptyState_(0)
    100         , calibratorCallbackHandler_(0)
     99        , emptyState_(nullptr)
     100        , calibratorCallbackHandler_(nullptr)
    101101    {
    102102        RegisterObject(InputManager);
     
    149149        // When loading the devices they should not already be loaded
    150150        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);
    153153        assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick);
    154154
     
    294294
    295295        // 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);
    298298
    299299        orxout(internal_status, context::input) << "InputManager: Destruction complete." << endl;
     
    316316            const std::string& className = device->getClassName();
    317317            delete device;
    318             device = 0;
     318            device = nullptr;
    319319            orxout(verbose, context::input) << className << " destroyed." << endl;
    320320        }
     
    526526    {
    527527        if (name.empty())
    528             return 0;
     528            return nullptr;
    529529        if (statesByName_.find(name) == statesByName_.end())
    530530        {
     
    539539                        orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '"
    540540                            << static_cast<int>(priority) << "' != 0." << endl;
    541                         return 0;
     541                        return nullptr;
    542542                    }
    543543                }
     
    551551        {
    552552            orxout(internal_warning, context::input) << "Could not add an InputState with the same name '" << name << "'." << endl;
    553             return 0;
     553            return nullptr;
    554554        }
    555555    }
     
    561561            return it->second;
    562562        else
    563             return 0;
     563            return nullptr;
    564564    }
    565565
Note: See TracChangeset for help on using the changeset viewer.