Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/object/Context.cc

    r10624 r11071  
    4040    RegisterClass(Context);
    4141
    42     Context* Context::rootContext_s = 0;
     42    Context* Context::rootContext_s = nullptr;
    4343
    4444    Context* getContextForInitializationOfOtherContexts()
     
    4646        static size_t count = 0;
    4747        // the first time this is called, ++count returns 1 and the context is created
    48         // the second time this is called, ++count returns 2 and NULL is returned because we're in the constructor of the context itself
     48        // the second time this is called, ++count returns 2 and nullptr is returned because we're in the constructor of the context itself
    4949        // for each future call the context (now completely created) is returned
    5050        if (++count == 2)
    51             return NULL;
     51            return nullptr;
    5252        else
    5353        {
    54             static Context context(NULL);
     54            static Context context(nullptr);
    5555            return &context;
    5656        }
     
    7070        // unregister context from object lists before object lists are destroyed
    7171        this->unregisterObject();
    72         for (size_t i = 0; i < this->objectLists_.size(); ++i)
    73             delete this->objectLists_[i];
     72        for (ObjectListBase* objectList : this->objectLists_)
     73            delete objectList;
    7474    }
    7575
     
    8282    {
    8383        delete Context::rootContext_s;
    84         Context::rootContext_s = NULL;
     84        Context::rootContext_s = nullptr;
    8585    }
    8686
    8787    /*static*/ Context* Context::getRootContext()
    8888    {
    89         OrxVerify(Context::rootContext_s != NULL, "Root Context is undefined");
     89        OrxVerify(Context::rootContext_s != nullptr, "Root Context is undefined");
    9090        return Context::rootContext_s;
    9191    }
     
    105105        ObjectListBase* objectList = this->getObjectList(identifier);
    106106        delete objectList;
    107         this->objectLists_[identifier->getClassID()] = NULL;
     107        this->objectLists_[identifier->getClassID()] = nullptr;
    108108    }
    109109}
Note: See TracChangeset for help on using the changeset viewer.