Changeset 10768 for code/branches/cpp11_v2/src/libraries/core/class
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries/core/class
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/class/Identifiable.cc
r10624 r10768 48 48 Identifiable::Identifiable() 49 49 { 50 this->identifier_ = 0;50 this->identifier_ = nullptr; 51 51 this->objectPointers_.reserve(6); // Optimisation 52 52 -
code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc
r10624 r10768 117 117 orxout(user_error) << "Aborting..." << endl; 118 118 abort(); 119 return 0;119 return nullptr; 120 120 } 121 121 } … … 393 393 return it->second; 394 394 else 395 return 0;395 return nullptr; 396 396 } 397 397 … … 407 407 return it->second; 408 408 else 409 return 0;409 return nullptr; 410 410 } 411 411 … … 438 438 return it->second; 439 439 else 440 return 0;440 return nullptr; 441 441 } 442 442 -
code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
r10765 r10768 56 56 object->getIdentifier()->getName(); // returns "MyClass" 57 57 58 Identifiable* other = object->getIdentifier()->fabricate( 0); // fabricates a new instance of MyClass58 Identifiable* other = object->getIdentifier()->fabricate(nullptr); // fabricates a new instance of MyClass 59 59 60 60 … … 137 137 138 138 /// Returns true if the Identifier has a Factory. 139 inline bool hasFactory() const { return (this->factory_ != 0); }139 inline bool hasFactory() const { return (this->factory_ != nullptr); } 140 140 141 141 Identifiable* fabricate(Context* context); … … 297 297 298 298 virtual bool canDynamicCastObjectToIdentifierClass(Identifiable* object) const 299 { return dynamic_cast<T*>(object) != 0; }299 { return dynamic_cast<T*>(object) != nullptr; } 300 300 301 301 virtual void destroyObjects(); … … 408 408 void ClassIdentifier<T>::destroyObjects() 409 409 { 410 this->destroyObjects((T*) 0);410 this->destroyObjects((T*)nullptr); 411 411 } 412 412 -
code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc
r10765 r10768 44 44 namespace orxonox 45 45 { 46 IdentifierManager* IdentifierManager::singletonPtr_s = 0;46 IdentifierManager* IdentifierManager::singletonPtr_s = nullptr; 47 47 48 48 IdentifierManager::IdentifierManager() … … 221 221 return it->second; 222 222 else 223 return 0;223 return nullptr; 224 224 } 225 225 … … 235 235 return it->second; 236 236 else 237 return 0;237 return nullptr; 238 238 } 239 239 … … 249 249 return it->second; 250 250 else 251 return 0;251 return nullptr; 252 252 } 253 253 … … 263 263 if ((*it)->getTypeInfo() == typeInfo) 264 264 return (*it); 265 return 0;265 return nullptr; 266 266 } 267 267 -
code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h
r10765 r10768 189 189 orxout(user_error) << "Aborting..." << endl; 190 190 abort(); 191 return 0;191 return nullptr; 192 192 } 193 193 } -
code/branches/cpp11_v2/src/libraries/core/class/Super.h
r10624 r10768 94 94 static void superCheck() \ 95 95 { \ 96 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>( 0)); \96 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(nullptr)); \ 97 97 SuperFunctionCondition<functionnumber + 1, T, 0, templatehack2>::superCheck(); \ 98 98 } \ … … 108 108 { \ 109 109 delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_; \ 110 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = 0; \110 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = nullptr; \ 111 111 ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false; \ 112 112 } \ … … 154 154 // This call to the apply-function is the whole check. By calling the function with 155 155 // a T* pointer, the right function get's called. 156 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>( 0));156 SuperFunctionCondition<functionnumber, T, 0, templatehack2>::apply(static_cast<T*>(nullptr)); 157 157 158 158 // Go go the superCheck for of next super-function (functionnumber + 1) … … 178 178 // Delete the fallback caller an prepare to get a real caller 179 179 delete ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_; 180 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = 0;180 ((ClassIdentifier<T>*)(*it))->superFunctionCaller_##functionname##_ = nullptr; 181 181 ((ClassIdentifier<T>*)(*it))->bSuperFunctionCaller_##functionname##_isFallback_ = false; 182 182 }
Note: See TracChangeset
for help on using the changeset viewer.