Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

replace 'NULL' by 'nullptr'

Location:
code/branches/cpp11_v2/src/libraries/core/class
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h

    r9667 r10765  
    9898                registered in the class hierarchy.
    9999            @return
    100                 Returns NULL if the no pointer was found.
     100                Returns nullptr if the no pointer was found.
    101101            */
    102102            ORX_FORCEINLINE void* getDerivedPointer(unsigned int classID)
     
    107107                        return this->objectPointers_[i].second;
    108108                }
    109                 return NULL;
     109                return nullptr;
    110110            }
    111111
  • 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);
  • code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc

    r10624 r10765  
    4949    {
    5050        this->hierarchyCreatingCounter_s = 0;
    51         this->recordTraceForIdentifier_ = NULL;
     51        this->recordTraceForIdentifier_ = nullptr;
    5252    }
    5353
     
    9292        // iterate over all identifiers, create one instance of each class and initialize the identifiers
    9393        {
    94             Context temporaryContext(NULL);
     94            Context temporaryContext(nullptr);
    9595            for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
    9696            {
     
    108108                    Identifiable* temp = identifier->fabricate(&temporaryContext);
    109109
    110                     this->recordTraceForIdentifier_ = NULL;
     110                    this->recordTraceForIdentifier_ = nullptr;
    111111
    112112                    if (temp->getIdentifier() != identifier)
     
    149149
    150150        // for all initialized identifiers, check if a sample instance behaves as expected according to the class hierarchy
    151         Context temporaryContext(NULL);
     151        Context temporaryContext(nullptr);
    152152        for (std::set<Identifier*>::const_iterator it1 = initializedIdentifiers.begin(); it1 != initializedIdentifiers.end(); ++it1)
    153153        {
  • code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h

    r9667 r10765  
    127127                    else
    128128                    {
    129                         orxout(internal_error) << "Can't assign NULL identifier" << endl;
     129                        orxout(internal_error) << "Can't assign nullptr identifier" << endl;
    130130                    }
    131131                }
Note: See TracChangeset for help on using the changeset viewer.