Changeset 10765 for code/branches/cpp11_v2/src/libraries/core/class
- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- 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 98 98 registered in the class hierarchy. 99 99 @return 100 Returns NULLif the no pointer was found.100 Returns nullptr if the no pointer was found. 101 101 */ 102 102 ORX_FORCEINLINE void* getDerivedPointer(unsigned int classID) … … 107 107 return this->objectPointers_[i].second; 108 108 } 109 return NULL;109 return nullptr; 110 110 } 111 111 -
code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
r10624 r10765 279 279 ClassIdentifier(const std::string& name, Factory* factory, bool bLoadable) : Identifier(name, factory, bLoadable) 280 280 { 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()); 282 282 ClassIdentifier<T>::classIdentifier_s = this; 283 283 … … 334 334 /*static*/ inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier() 335 335 { 336 if (ClassIdentifier<T>::classIdentifier_s == NULL)336 if (ClassIdentifier<T>::classIdentifier_s == nullptr) 337 337 ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*) IdentifierManager::getInstance().getIdentifierByTypeInfo(typeid(T)); 338 338 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() << "?"); 340 340 return ClassIdentifier<T>::classIdentifier_s; 341 341 } … … 451 451 void ClassIdentifier<T>::updateConfigValues(bool updateChildren) const 452 452 { 453 this->updateConfigValues(updateChildren, static_cast<T*>( NULL));453 this->updateConfigValues(updateChildren, static_cast<T*>(nullptr)); 454 454 } 455 455 … … 483 483 registered in the class hierarchy. 484 484 @return 485 Returns NULLif the cast is not possible485 Returns nullptr if the cast is not possible 486 486 @note 487 In case of NULLreturn (and using MSVC), a dynamic_cast might still be possible if487 In case of nullptr return (and using MSVC), a dynamic_cast might still be possible if 488 488 a class forgot to register its objects. 489 489 Also note that the function is implemented differently for GCC/MSVC. … … 494 494 #ifdef ORXONOX_COMPILER_MSVC 495 495 typedef Loki::TypeTraits<typename Loki::TypeTraits<T>::PointeeType>::NonConstType ClassType; 496 if (source != NULL)496 if (source != nullptr) 497 497 return source->template getDerivedPointer<ClassType>(ClassIdentifier<ClassType>::getIdentifier()->getClassID()); 498 498 else 499 return NULL;499 return nullptr; 500 500 #else 501 501 return dynamic_cast<T>(source); -
code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc
r10624 r10765 49 49 { 50 50 this->hierarchyCreatingCounter_s = 0; 51 this->recordTraceForIdentifier_ = NULL;51 this->recordTraceForIdentifier_ = nullptr; 52 52 } 53 53 … … 92 92 // iterate over all identifiers, create one instance of each class and initialize the identifiers 93 93 { 94 Context temporaryContext( NULL);94 Context temporaryContext(nullptr); 95 95 for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it) 96 96 { … … 108 108 Identifiable* temp = identifier->fabricate(&temporaryContext); 109 109 110 this->recordTraceForIdentifier_ = NULL;110 this->recordTraceForIdentifier_ = nullptr; 111 111 112 112 if (temp->getIdentifier() != identifier) … … 149 149 150 150 // 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); 152 152 for (std::set<Identifier*>::const_iterator it1 = initializedIdentifiers.begin(); it1 != initializedIdentifiers.end(); ++it1) 153 153 { -
code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h
r9667 r10765 127 127 else 128 128 { 129 orxout(internal_error) << "Can't assign NULLidentifier" << endl;129 orxout(internal_error) << "Can't assign nullptr identifier" << endl; 130 130 } 131 131 }
Note: See TracChangeset
for help on using the changeset viewer.