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/class/Identifier.h

    r10624 r10765  
    279279            ClassIdentifier(const std::string& name, Factory* factory, bool bLoadable) : Identifier(name, factory, bLoadable)
    280280            {
    281                 OrxVerify(ClassIdentifier<T>::classIdentifier_s == NULL, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
     281                OrxVerify(ClassIdentifier<T>::classIdentifier_s == nullptr, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
    282282                ClassIdentifier<T>::classIdentifier_s = this;
    283283
     
    334334    /*static*/ inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
    335335    {
    336         if (ClassIdentifier<T>::classIdentifier_s == NULL)
     336        if (ClassIdentifier<T>::classIdentifier_s == nullptr)
    337337            ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*) IdentifierManager::getInstance().getIdentifierByTypeInfo(typeid(T));
    338338
    339         OrxVerify(ClassIdentifier<T>::classIdentifier_s != NULL, "Did you forget to register the class of type " << typeid(T).name() << "?");
     339        OrxVerify(ClassIdentifier<T>::classIdentifier_s != nullptr, "Did you forget to register the class of type " << typeid(T).name() << "?");
    340340        return ClassIdentifier<T>::classIdentifier_s;
    341341    }
     
    451451    void ClassIdentifier<T>::updateConfigValues(bool updateChildren) const
    452452    {
    453         this->updateConfigValues(updateChildren, static_cast<T*>(NULL));
     453        this->updateConfigValues(updateChildren, static_cast<T*>(nullptr));
    454454    }
    455455
     
    483483        registered in the class hierarchy.
    484484    @return
    485         Returns NULL if the cast is not possible
     485        Returns nullptr if the cast is not possible
    486486    @note
    487         In case of NULL return (and using MSVC), a dynamic_cast might still be possible if
     487        In case of nullptr return (and using MSVC), a dynamic_cast might still be possible if
    488488        a class forgot to register its objects.
    489489        Also note that the function is implemented differently for GCC/MSVC.
     
    494494#ifdef ORXONOX_COMPILER_MSVC
    495495        typedef Loki::TypeTraits<typename Loki::TypeTraits<T>::PointeeType>::NonConstType ClassType;
    496         if (source != NULL)
     496        if (source != nullptr)
    497497            return source->template getDerivedPointer<ClassType>(ClassIdentifier<ClassType>::getIdentifier()->getClassID());
    498498        else
    499             return NULL;
     499            return nullptr;
    500500#else
    501501        return dynamic_cast<T>(source);
Note: See TracChangeset for help on using the changeset viewer.