Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2015, 10:25:42 PM (9 years ago)
Author:
landauf
Message:

replace 'NULL' by 'nullptr'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc

    r10624 r10765  
    8383            ThrowException(InitialisationAborted, "Sound: Not loading at all");
    8484#if !defined(ORXONOX_PLATFORM_APPLE)
    85         if (!alutInitWithoutContext(NULL, NULL))
     85        if (!alutInitWithoutContext(nullptr, nullptr))
    8686            ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
    8787        Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
     
    9090/*
    9191        // Get list of available sound devices and display them
    92         const char* devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
     92        const char* devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
    9393        char* device = new char[strlen(devices)+1];
    9494        strcpy(device, devices);
     
    110110        this->device_ = alcOpenDevice(renderDevice.c_str());
    111111*/
    112         this->device_ = alcOpenDevice(NULL);
    113         if (this->device_ == NULL)
     112        this->device_ = alcOpenDevice(nullptr);
     113        if (this->device_ == nullptr)
    114114            ThrowException(InitialisationFailed, "Sound Error: Could not open sound device.");
    115115        Loki::ScopeGuard closeDeviceGuard = Loki::MakeGuard(&alcCloseDevice, this->device_);
    116116
    117117        // Create sound context and make it the currently used one
    118         this->context_ = alcCreateContext(this->device_, NULL);
    119         if (this->context_ == NULL)
     118        this->context_ = alcCreateContext(this->device_, nullptr);
     119        if (this->context_ == nullptr)
    120120            ThrowException(InitialisationFailed, "Sound Error: Could not create ALC context");
    121121        Loki::ScopeGuard desroyContextGuard = Loki::MakeGuard(&alcDestroyContext, this->context_);
     
    189189
    190190        // Relieve context to destroy it
    191         if (!alcMakeContextCurrent(NULL))
     191        if (!alcMakeContextCurrent(nullptr))
    192192            orxout(internal_error, context::sound) << "Could not unset ALC context" << endl;
    193193        alcDestroyContext(this->context_);
     
    350350    void SoundManager::registerAmbientSound(AmbientSound* newAmbient)
    351351    {
    352         if (newAmbient != NULL && !this->bDestructorCalled_)
     352        if (newAmbient != nullptr && !this->bDestructorCalled_)
    353353        {
    354354            for (AmbientList::const_iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
     
    373373    void SoundManager::unregisterAmbientSound(AmbientSound* oldAmbient)
    374374    {
    375         if (oldAmbient == NULL || ambientSounds_.empty() || this->bDestructorCalled_)
     375        if (oldAmbient == nullptr || ambientSounds_.empty() || this->bDestructorCalled_)
    376376            return;
    377377
     
    405405    void SoundManager::pauseAmbientSound(AmbientSound* ambient)
    406406    {
    407         if (ambient != NULL)
     407        if (ambient != nullptr)
    408408        {
    409409            for (AmbientList::iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
Note: See TracChangeset for help on using the changeset viewer.