- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note: See TracChangeset
for help on using the changeset viewer.