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/libraries/core/LuaState.cc

    r10265 r10765  
    4848    LuaState::LuaState()
    4949        : bIsRunning_(false)
    50         , includeParseFunction_(NULL)
     50        , includeParseFunction_(nullptr)
    5151    {
    5252        // Create new lua state and configure it
     
    8484        shared_ptr<ResourceInfo> sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename);
    8585        // Continue search in root directories
    86         if (sourceInfo == NULL && !sourceFileInfo_->path.empty())
     86        if (sourceInfo == nullptr && !sourceFileInfo_->path.empty())
    8787            sourceInfo = Resource::getInfo(filename);
    8888        return sourceInfo;
     
    9292    {
    9393        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    94         if (sourceInfo != NULL)
     94        if (sourceInfo != nullptr)
    9595            return this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
    9696        else
     
    105105        // Parse string with provided include parser (otherwise don't preparse at all)
    106106        std::string luaInput;
    107         if (includeParseFunction_ != NULL)
     107        if (includeParseFunction_ != nullptr)
    108108            luaInput = (*includeParseFunction_)(code);
    109109        else
    110110            luaInput = code;
    111111
    112         if (sourceFileInfo != NULL)
     112        if (sourceFileInfo != nullptr)
    113113        {
    114114            // Also fill a map with the actual source code. This is just for the include* commands
     
    119119        bool returnValue = this->doString(luaInput, sourceFileInfo);
    120120
    121         if (sourceFileInfo != NULL)
     121        if (sourceFileInfo != nullptr)
    122122        {
    123123            // Delete source code entry
    124             if (sourceFileInfo != NULL)
     124            if (sourceFileInfo != nullptr)
    125125                this->sourceCodeMap_.erase(sourceFileInfo->filename);
    126126        }
     
    132132    {
    133133        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    134         if (sourceInfo != NULL)
     134        if (sourceInfo != nullptr)
    135135            return this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
    136136        else
     
    146146        shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
    147147        // Only override if sourceFileInfo provides useful information
    148         if (sourceFileInfo != NULL)
     148        if (sourceFileInfo != nullptr)
    149149            sourceFileInfo_ = sourceFileInfo;
    150150
    151151        std::string chunkname;
    152         if (sourceFileInfo != NULL)
     152        if (sourceFileInfo != nullptr)
    153153        {
    154154            // Provide lua_load with the filename for debug purposes
     
    286286    {
    287287        shared_ptr<ResourceInfo> info = this->getFileInfo(filename);
    288         if (info == NULL)
     288        if (info == nullptr)
    289289            return false;
    290290        else
     
    301301            return it->second;
    302302        shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
    303         if (info == NULL)
     303        if (info == nullptr)
    304304            return "";
    305305        else
Note: See TracChangeset for help on using the changeset viewer.