- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2
- Files:
-
- 215 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/ApplicationPaths.cc
r10765 r10768 68 68 69 69 //! Static pointer to the singleton 70 ApplicationPaths* ApplicationPaths::singletonPtr_s = 0;70 ApplicationPaths* ApplicationPaths::singletonPtr_s = nullptr; 71 71 72 72 ApplicationPaths::ApplicationPaths() -
code/branches/cpp11_v2/src/libraries/core/BaseObject.cc
r10765 r10768 65 65 this->bRegisteredEventStates_ = false; 66 66 67 this->lastLoadedXMLElement_ = 0;68 69 this->mainStateFunctor_ = 0;67 this->lastLoadedXMLElement_ = nullptr; 68 69 this->mainStateFunctor_ = nullptr; 70 70 71 71 if (context) … … 86 86 else 87 87 { 88 this->file_ = 0;88 this->file_ = nullptr; 89 89 this->sceneID_ = OBJECTID_UNKNOWN; 90 90 } … … 132 132 XMLPortObject(BaseObject, BaseObject, "eventlisteners", addEventListener, getEventListener, xmlelement, mode); 133 133 134 Element* events = 0;134 Element* events = nullptr; 135 135 if (mode == XMLPort::LoadObject || mode == XMLPort::ExpandObject) 136 136 events = xmlelement.FirstChildElement("events", false); … … 240 240 i++; 241 241 } 242 return 0;242 return nullptr; 243 243 } 244 244 … … 278 278 ++i; 279 279 } 280 return 0;280 return nullptr; 281 281 } 282 282 … … 302 302 ++i; 303 303 } 304 return 0;304 return nullptr; 305 305 } 306 306 … … 331 331 return (it->second); 332 332 else 333 return 0;333 return nullptr; 334 334 } 335 335 … … 423 423 void BaseObject::changedMainStateName() 424 424 { 425 this->mainStateFunctor_ = 0;425 this->mainStateFunctor_ = nullptr; 426 426 427 427 if (!this->mainStateName_.empty()) -
code/branches/cpp11_v2/src/libraries/core/BaseObject.h
r10765 r10768 218 218 bool bInitialized_; //!< True if the object was initialized (passed the object registration) 219 219 const XMLFile* file_; //!< The XMLFile that loaded this object 220 Element* lastLoadedXMLElement_; //!< Non 0if the TinyXML attributes have already been copied to our own lowercase map220 Element* lastLoadedXMLElement_; //!< Non nullptr if the TinyXML attributes have already been copied to our own lowercase map 221 221 std::map<std::string, std::string> xmlAttributes_; //!< Lowercase XML attributes 222 222 std::string loaderIndentation_; //!< Indentation of the debug output in the Loader -
code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc
r10624 r10768 207 207 return ((*this->nodes_.top().first) == compare); 208 208 else 209 return (compare == 0);209 return (compare == nullptr); 210 210 } 211 211 … … 218 218 return ((*this->nodes_.top().first) != compare); 219 219 else 220 return (compare != 0);220 return (compare != nullptr); 221 221 } 222 222 -
code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.h
r10693 r10768 211 211 inline const ClassTreeMask& begin() const { return (*this); } 212 212 /// End of the ClassTreeMaskObjectIterator. 213 inline BaseObject* end() const { return 0; }213 inline BaseObject* end() const { return nullptr; } 214 214 215 215 ClassTreeMask& operator=(const ClassTreeMask& other); … … 285 285 286 286 /// Returns true if the ClassTreeMaskObjectIterator points at the given object. 287 inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == 0); }287 inline bool operator==(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) == pointer) || (!this->objectIterator_ && pointer == nullptr); } 288 288 /// Returns true if the ClassTreeMaskObjectIterator doesn't point at the given object. 289 inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != 0); }289 inline bool operator!=(BaseObject* pointer) const { return (this->objectIterator_ && (*this->objectIterator_) != pointer) || (!this->objectIterator_ && pointer != nullptr); } 290 290 /// Returns true if the ClassTreeMaskObjectIterator hasn't already reached the end. 291 291 inline operator bool() const { return (this->objectIterator_); } -
code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc
r10765 r10768 67 67 68 68 //! Static pointer to the singleton 69 ConfigurablePaths* ConfigurablePaths::singletonPtr_s = 0;69 ConfigurablePaths* ConfigurablePaths::singletonPtr_s = nullptr; 70 70 71 71 SetCommandLineArgument(externalDataPath, "").information("Path to the external data files"); -
code/branches/cpp11_v2/src/libraries/core/Core.cc
r10765 r10768 83 83 { 84 84 //! Static pointer to the singleton 85 Core* Core::singletonPtr_s = 0;85 Core* Core::singletonPtr_s = nullptr; 86 86 87 87 SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file"); -
code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
r10765 r10768 248 248 static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button); 249 249 250 GUIManager* GUIManager::singletonPtr_s = 0;250 GUIManager* GUIManager::singletonPtr_s = nullptr; 251 251 /*static*/ const std::string GUIManager::defaultScheme_ = "TaharezGreen"; //Alternative: Orxonox (not fully complete yet, see the graphics menu) 252 252 … … 337 337 // Create the CEGUI system singleton 338 338 #ifdef ORXONOX_OLD_CEGUI 339 guiSystem_ = new System(guiRenderer_, resourceProvider_, 0, scriptModule_);339 guiSystem_ = new System(guiRenderer_, resourceProvider_, nullptr, scriptModule_); 340 340 // Add functions that have been renamed in newer versions 341 341 luaState_->doString("CEGUI.SchemeManager.create = CEGUI.SchemeManager.loadScheme"); … … 343 343 luaState_->doString("CEGUI.ImagesetManager.createFromImageFile= CEGUI.ImagesetManager.createImagesetFromImageFile"); 344 344 #else 345 guiSystem_ = &System::create(*guiRenderer_, resourceProvider_, 0, imageCodec_, scriptModule_);345 guiSystem_ = &System::create(*guiRenderer_, resourceProvider_, nullptr, imageCodec_, scriptModule_); 346 346 #endif 347 347 … … 468 468 #ifdef ORXONOX_OLD_CEGUI 469 469 if (camera == nullptr) 470 this->guiRenderer_->setTargetSceneManager( 0);470 this->guiRenderer_->setTargetSceneManager(nullptr); 471 471 else 472 472 this->guiRenderer_->setTargetSceneManager(camera->getSceneManager()); -
code/branches/cpp11_v2/src/libraries/core/GUIManager.h
r9675 r10768 135 135 inline void setPlayer(const std::string& guiname, PlayerInfo* player) 136 136 { this->players_[guiname] = player; } 137 inline orxonox::PlayerInfo* getPlayer(const std::string& guiname) const { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : 0; } // tolua_export137 inline orxonox::PlayerInfo* getPlayer(const std::string& guiname) const { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : nullptr; } // tolua_export 138 138 139 139 // TODO: Temporary hack because the tolua exported CEGUI method does not seem to work -
code/branches/cpp11_v2/src/libraries/core/Game.cc
r10765 r10768 66 66 67 67 std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s; 68 Game* Game::singletonPtr_s = 0;68 Game* Game::singletonPtr_s = nullptr; 69 69 70 70 //! Represents one node of the game state tree. -
code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc
r10765 r10768 93 93 }; 94 94 95 GraphicsManager* GraphicsManager::singletonPtr_s = 0;95 GraphicsManager* GraphicsManager::singletonPtr_s = nullptr; 96 96 97 97 RegisterAbstractClass(GraphicsManager).inheritsFrom<Configurable>(); … … 99 99 GraphicsManager::GraphicsManager(bool bLoadRenderer) 100 100 : ogreWindowEventListener_(new OgreWindowEventListener()) 101 , renderWindow_( 0)102 , viewport_( 0)101 , renderWindow_(nullptr) 102 , viewport_(nullptr) 103 103 , lastFrameStartTime_(0.0f) 104 104 , lastFrameEndTime_(0.0f) … … 304 304 // But in our case we only have one viewport for now anyway, therefore 305 305 // no ScopeGuards or anything to handle exceptions. 306 this->viewport_ = this->renderWindow_->addViewport( 0, 0);306 this->viewport_ = this->renderWindow_->addViewport(nullptr, 0); 307 307 308 308 Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED); … … 312 312 HWND hwnd; 313 313 this->renderWindow_->getCustomAttribute("WINDOW", (void*)&hwnd); 314 LONG iconID = (LONG)LoadIcon(GetModuleHandle( 0), MAKEINTRESOURCE(101));314 LONG iconID = (LONG)LoadIcon(GetModuleHandle(nullptr), MAKEINTRESOURCE(101)); 315 315 SetClassLong(hwnd, GCL_HICON, iconID); 316 316 #endif -
code/branches/cpp11_v2/src/libraries/core/Language.cc
r10624 r10768 88 88 // ############################### 89 89 90 Language* Language::singletonPtr_s = 0;90 Language* Language::singletonPtr_s = nullptr; 91 91 92 92 /** -
code/branches/cpp11_v2/src/libraries/core/Loader.cc
r10765 r10768 48 48 namespace orxonox 49 49 { 50 Loader* Loader::singletonPtr_s = 0;50 Loader* Loader::singletonPtr_s = nullptr; 51 51 52 52 /** -
code/branches/cpp11_v2/src/libraries/core/Namespace.cc
r10624 r10768 109 109 const BaseObject* Namespace::saveObjects(unsigned int index) const 110 110 { 111 return 0; // todo111 return nullptr; // todo 112 112 } 113 113 -
code/branches/cpp11_v2/src/libraries/core/NamespaceNode.h
r7401 r10768 46 46 { 47 47 public: 48 NamespaceNode(const std::string& name, NamespaceNode* parent = 0);48 NamespaceNode(const std::string& name, NamespaceNode* parent = nullptr); 49 49 ~NamespaceNode(); 50 50 -
code/branches/cpp11_v2/src/libraries/core/Template.cc
r9667 r10768 49 49 this->bLoadDefaults_ = true; 50 50 this->bIsReturningXMLElement_ = false; 51 this->baseclassIdentifier_ = 0;51 this->baseclassIdentifier_ = nullptr; 52 52 } 53 53 … … 176 176 { 177 177 orxout(internal_warning, context::templates) << "Template with name " << name << " doesn't exist." << endl; 178 return 0;178 return nullptr; 179 179 } 180 180 } -
code/branches/cpp11_v2/src/libraries/core/Thread.cc
r8399 r10768 48 48 49 49 Thread::Thread(): 50 executor_( 0),50 executor_(nullptr), 51 51 isWorking_(false), 52 52 stopThread_(false) … … 102 102 (*executor)(); 103 103 this->executorMutex_->lock(); 104 this->executor_ = 0;104 this->executor_ = nullptr; 105 105 this->executorMutex_->unlock(); 106 106 this->isWorkingMutex_->lock(); -
code/branches/cpp11_v2/src/libraries/core/ThreadWin.cc
r8706 r10768 45 45 46 46 Thread::Thread(): 47 executor_( 0),47 executor_(nullptr), 48 48 isWorking_(false), 49 49 stopThread_(false) … … 101 101 // (*executor)(); 102 102 // this->executorMutex_->lock(); 103 // this->executor_ = 0;103 // this->executor_ = nullptr; 104 104 // this->executorMutex_->unlock(); 105 105 // this->isWorkingMutex_->lock(); -
code/branches/cpp11_v2/src/libraries/core/XMLPort.h
r9667 r10768 245 245 return my_added_objects[index]; 246 246 else 247 return 0;247 return nullptr; 248 248 } 249 249 @endcode … … 399 399 // Iterate through the attributes manually in order to make them case insensitive 400 400 ticpp::Attribute* attribute = xmlelement.FirstAttribute(false); 401 while (attribute != 0)401 while (attribute != nullptr) 402 402 { 403 403 this->owner_->xmlAttributes_[getLowercase(attribute->Name())] = attribute->Value(); -
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 } -
code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
r10765 r10768 54 54 void CommandEvaluation::initialize(const std::string& command) 55 55 { 56 this->execCommand_ = 0;57 this->hintCommand_ = 0;56 this->execCommand_ = nullptr; 57 this->hintCommand_ = nullptr; 58 58 this->string_ = command; 59 59 this->execArgumentsOffset_ = 0; -
code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.h
r10765 r10768 86 86 87 87 int execute(); 88 MultiType query(int* error = 0);88 MultiType query(int* error = nullptr); 89 89 90 90 std::string complete(); … … 97 97 /// Returns true if the command evaluation contains a valid command that can be executed. 98 98 inline bool isValid() const 99 { return (this->execCommand_ != 0); }99 { return (this->execCommand_ != nullptr); } 100 100 101 101 /// Returns the console command that was evaluated by this object. -
code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.h
r8858 r10768 113 113 static int execute(const std::string& command, bool useTcl = true, bool printErrors = true); // tolua_export 114 114 115 static MultiType queryMT(const std::string& command, int* error = 0, bool useTcl = true);116 static std::string query(const std::string& command, int* error = 0, bool useTcl = true); // tolua_export115 static MultiType queryMT(const std::string& command, int* error = nullptr, bool useTcl = true); 116 static std::string query(const std::string& command, int* error = NULL, bool useTcl = true); // tolua_export 117 117 118 118 static CommandEvaluation evaluate(const std::string& command); -
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
r10765 r10768 76 76 77 77 for (size_t i = 0; i < MAX_FUNCTOR_ARGUMENTS; ++i) 78 this->argumentCompleter_[i] = 0;78 this->argumentCompleter_[i] = nullptr; 79 79 80 80 this->keybindMode_ = KeybindMode::OnPress; … … 353 353 { 354 354 if (this->executor_) 355 this->executor_->setFunctor( 0);355 this->executor_->setFunctor(nullptr); 356 356 this->objectStack_.clear(); 357 357 } … … 405 405 void ConsoleCommand::popObject() 406 406 { 407 void* newobject = 0;407 void* newobject = nullptr; 408 408 if (!this->objectStack_.empty()) 409 409 { … … 422 422 return this->executor_->getFunctor()->getRawObjectPointer(); 423 423 else 424 return 0;424 return nullptr; 425 425 } 426 426 … … 528 528 return this->argumentCompleter_[index]; 529 529 else 530 return 0;530 return nullptr; 531 531 } 532 532 -
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandManager.cc
r10624 r10768 39 39 namespace orxonox 40 40 { 41 ConsoleCommandManager* ConsoleCommandManager::singletonPtr_s = 0;41 ConsoleCommandManager* ConsoleCommandManager::singletonPtr_s = nullptr; 42 42 43 43 /** … … 68 68 orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl; 69 69 } 70 return 0;70 return nullptr; 71 71 } 72 72 … … 101 101 orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl; 102 102 } 103 return 0;103 return nullptr; 104 104 } 105 105 … … 125 125 126 126 // check if a command with this name already exists 127 if (this->getCommand(group, name) != 0)127 if (this->getCommand(group, name) != nullptr) 128 128 { 129 129 if (group == "") -
code/branches/cpp11_v2/src/libraries/core/command/Executor.h
r9550 r10768 121 121 { return (*this->functor_)(arg1, arg2, arg3, arg4, arg5); } 122 122 123 MultiType parse(const std::string& arguments, int* error = 0, const std::string& delimiter = " ", bool bPrintError = false) const;124 MultiType parse(const SubString& arguments, int* error = 0, const std::string& delimiter = " ", bool bPrintError = false) const;125 126 int evaluateArguments(const SubString& arguments, MultiType arg[MAX_FUNCTOR_ARGUMENTS], int* error = 0, const std::string& delimiter = " ") const;123 MultiType parse(const std::string& arguments, int* error = nullptr, const std::string& delimiter = " ", bool bPrintError = false) const; 124 MultiType parse(const SubString& arguments, int* error = nullptr, const std::string& delimiter = " ", bool bPrintError = false) const; 125 126 int evaluateArguments(const SubString& arguments, MultiType arg[MAX_FUNCTOR_ARGUMENTS], int* error = nullptr, const std::string& delimiter = " ") const; 127 127 128 128 /// Changes the functor. … … 249 249 250 250 /// Overloads Executor::parse() with an additional object-pointer. 251 MultiType parse(T* object, const std::string& arguments, int* error = 0, const std::string& delimiter = " ", bool bPrintError = false) const251 MultiType parse(T* object, const std::string& arguments, int* error = nullptr, const std::string& delimiter = " ", bool bPrintError = false) const 252 252 { 253 253 T* oldobject = this->functorMember_->getObject(); -
code/branches/cpp11_v2/src/libraries/core/command/Functor.h
r10765 r10768 242 242 public: 243 243 /// Constructor: Stores the object-pointer. 244 FunctorMember(O* object = 0) : object_(object), bSafeMode_(false) {}244 FunctorMember(O* object = nullptr) : object_(object), bSafeMode_(false) {} 245 245 virtual ~FunctorMember() { if (this->bSafeMode_) { this->unregisterObject(this->object_); } } 246 246 … … 310 310 /// Will be called by Destroyable::~Destroyable() if the stored object is deleted and the Functor is in safe mode. 311 311 inline void objectDeleted() 312 { this->object_ = 0; }312 { this->object_ = nullptr; } 313 313 314 314 O* object_; ///< The stored object-pointer, used to execute a member-function (or nullptr for static functions) … … 322 322 public: 323 323 /// Constructor: Stores the object-pointer. 324 FunctorMember(void* object = 0) {}324 FunctorMember(void* object = nullptr) {} 325 325 326 326 /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be nullptr. @return Returns the return-value of the function (if any; MultiType::Null otherwise) … … 330 330 MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) 331 331 { 332 return (*this)((void*) 0, param1, param2, param3, param4, param5);332 return (*this)((void*)nullptr, param1, param2, param3, param4, param5); 333 333 } 334 334 … … 342 342 // see Functor::getRawObjectPointer() 343 343 inline void* getRawObjectPointer() const 344 { return 0; }344 { return nullptr; } 345 345 346 346 // see Functor::setSafeMode() … … 369 369 public: 370 370 /// Constructor: Initializes the base class and stores the function-pointer. 371 FunctorPointer(F functionPointer, O* object = 0) : FunctorMember<O>(object), functionPointer_(functionPointer) {}371 FunctorPointer(F functionPointer, O* object = nullptr) : FunctorMember<O>(object), functionPointer_(functionPointer) {} 372 372 373 373 /// Changes the function-pointer. … … 494 494 public: 495 495 /// Constructor: Initializes the base class. 496 FunctorTemplate(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, P5>::Type functionPointer, O* object = 0) : FunctorPointer<typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, P5>::Type, O>(functionPointer, object) {}496 FunctorTemplate(typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, P5>::Type functionPointer, O* object = nullptr) : FunctorPointer<typename detail::FunctionPointer<R, O, isconst, P1, P2, P3, P4, P5>::Type, O>(functionPointer, object) {} 497 497 498 498 // see FunctorMember::operator()() -
code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.cc
r10765 r10768 62 62 , promptString_("orxonox # ") 63 63 , bStatusPrinted_(false) 64 , originalTerminalSettings_( 0)64 , originalTerminalSettings_(nullptr) 65 65 { 66 66 this->setTerminalMode(); … … 326 326 tcsetattr(0, TCSANOW, IOConsole::singletonPtr_s->originalTerminalSettings_); 327 327 delete IOConsole::singletonPtr_s->originalTerminalSettings_; 328 IOConsole::singletonPtr_s->originalTerminalSettings_ = 0;328 IOConsole::singletonPtr_s->originalTerminalSettings_ = nullptr; 329 329 } 330 330 } -
code/branches/cpp11_v2/src/libraries/core/command/IRC.cc
r10624 r10768 66 66 IRC::IRC() 67 67 { 68 this->interpreter_ = 0;68 this->interpreter_ = nullptr; 69 69 } 70 70 -
code/branches/cpp11_v2/src/libraries/core/command/TclBind.cc
r10765 r10768 47 47 SetConsoleCommand("bgerror", &TclBind::bgerror).hide(); 48 48 49 TclBind* TclBind::singletonPtr_s = 0;49 TclBind* TclBind::singletonPtr_s = nullptr; 50 50 51 51 /** … … 55 55 TclBind::TclBind(const std::string& datapath) 56 56 { 57 this->interpreter_ = 0;57 this->interpreter_ = nullptr; 58 58 this->bSetTclDataPath_ = false; 59 59 this->setDataPath(datapath); -
code/branches/cpp11_v2/src/libraries/core/command/TclBind.h
r8079 r10768 121 121 static void tcl_execute(Tcl::object const &args); 122 122 123 static std::string eval(const std::string& tclcode, int* error = 0);123 static std::string eval(const std::string& tclcode, int* error = nullptr); 124 124 125 125 private: -
code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc
r10624 r10768 86 86 }; 87 87 88 TclThreadManager* TclThreadManager::singletonPtr_s = 0;88 TclThreadManager* TclThreadManager::singletonPtr_s = nullptr; 89 89 90 90 /** … … 289 289 catch (const Tcl::tcl_error& e) 290 290 { 291 bundle->interpreter_ = 0;291 bundle->interpreter_ = nullptr; 292 292 orxout(user_error, context::tcl) << "Tcl error while creating Tcl-interpreter (" << id_string << "): " << e.what() << endl; 293 293 } … … 521 521 { 522 522 TclThreadManager::error("No Tcl-interpreter with ID " + multi_cast<std::string>(id) + " existing."); 523 return 0;523 return nullptr; 524 524 } 525 525 } -
code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc
r10542 r10768 40 40 namespace orxonox 41 41 { 42 CommandLineParser* CommandLineParser::singletonPtr_s = 0;42 CommandLineParser* CommandLineParser::singletonPtr_s = nullptr; 43 43 44 44 /** -
code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc
r10765 r10768 113 113 if (file.is_open()) 114 114 { 115 ConfigFileSection* newsection = 0;115 ConfigFileSection* newsection = nullptr; 116 116 117 117 while (file.good() && !file.eof()) … … 140 140 } 141 141 142 if (newsection != 0)142 if (newsection != nullptr) 143 143 { 144 144 if (isComment(line)) -
code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc
r10765 r10768 42 42 /////////////////////// 43 43 44 ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;44 ConfigFileManager* ConfigFileManager::singletonPtr_s = nullptr; 45 45 46 46 /// Constructor: Initializes the array of config files with nullptr. -
code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.cc
r9559 r10768 53 53 this->sectionname_ = sectionname; 54 54 this->varname_ = varname; 55 this->callback_ = 0;55 this->callback_ = nullptr; 56 56 this->bContainerIsNew_ = true; 57 57 this->bDoInitialCallback_ = false; -
code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc
r10765 r10768 57 57 SetConsoleCommand(__CC_getConfig_name, &SettingsConfigFile::getConfig).argumentCompleter(0, autocompletion::settingssections()).argumentCompleter(1, autocompletion::settingsentries()); 58 58 59 SettingsConfigFile* SettingsConfigFile::singletonPtr_s = 0;59 SettingsConfigFile* SettingsConfigFile::singletonPtr_s = nullptr; 60 60 61 61 /** … … 77 77 SettingsConfigFile::~SettingsConfigFile() 78 78 { 79 ModifyConsoleCommand(__CC_load_name).setObject( 0);80 ModifyConsoleCommand(__CC_setFilename_name).setObject( 0);81 ModifyConsoleCommand(__CC_config_name).setObject( 0);82 ModifyConsoleCommand(__CC_tconfig_name).setObject( 0);83 ModifyConsoleCommand(__CC_getConfig_name).setObject( 0);79 ModifyConsoleCommand(__CC_load_name).setObject(nullptr); 80 ModifyConsoleCommand(__CC_setFilename_name).setObject(nullptr); 81 ModifyConsoleCommand(__CC_config_name).setObject(nullptr); 82 ModifyConsoleCommand(__CC_tconfig_name).setObject(nullptr); 83 ModifyConsoleCommand(__CC_getConfig_name).setObject(nullptr); 84 84 } 85 85 -
code/branches/cpp11_v2/src/libraries/core/input/Button.cc
r9983 r10768 53 53 Button::Button() 54 54 : bButtonThresholdUser_(false) 55 , paramCommandBuffer_( 0)55 , paramCommandBuffer_(nullptr) 56 56 { 57 57 nCommands_[0]=0; … … 75 75 delete commands_[j][i]; 76 76 delete[] commands_[j]; 77 commands_[j] = 0;77 commands_[j] = nullptr; 78 78 nCommands_[j] = 0; 79 79 } … … 206 206 } 207 207 } 208 if (cmd->paramCommand_ == 0)208 if (cmd->paramCommand_ == nullptr) 209 209 { 210 210 cmd->paramCommand_ = new BufferedParamCommand(); … … 239 239 } 240 240 else 241 commands_[j] = 0;241 commands_[j] = nullptr; 242 242 } 243 243 } -
code/branches/cpp11_v2/src/libraries/core/input/HalfAxis.h
r7859 r10768 49 49 : relVal_(0.0f) 50 50 , absVal_(0.0f) 51 , paramCommands_( 0)51 , paramCommands_(nullptr) 52 52 , nParamCommands_(0) 53 53 , pressed_(false) -
code/branches/cpp11_v2/src/libraries/core/input/InputCommands.h
r9978 r10768 103 103 { 104 104 public: 105 ParamCommand() : scale_(1.0f), paramCommand_( 0) { }105 ParamCommand() : scale_(1.0f), paramCommand_(nullptr) { } 106 106 bool execute(float abs = 1.0f, float rel = 1.0f); 107 107 CommandEvaluation* getEvaluation(); … … 118 118 return &this->paramCommand_->evaluation_; 119 119 else 120 return 0;120 return nullptr; 121 121 } 122 122 } -
code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
r10765 r10768 72 72 InputHandler InputHandler::EMPTY; 73 73 74 InputManager* InputManager::singletonPtr_s = 0;74 InputManager* InputManager::singletonPtr_s = nullptr; 75 75 76 76 //! Defines the |= operator for easier use. … … 94 94 InputManager::InputManager() 95 95 : internalState_(Bad) 96 , oisInputManager_( 0)96 , oisInputManager_(nullptr) 97 97 , devices_(2) 98 98 , exclusiveMouse_(false) 99 , emptyState_( 0)100 , calibratorCallbackHandler_( 0)99 , emptyState_(nullptr) 100 , calibratorCallbackHandler_(nullptr) 101 101 { 102 102 RegisterObject(InputManager); … … 149 149 // When loading the devices they should not already be loaded 150 150 assert(internalState_ & Bad); 151 assert(devices_[InputDeviceEnumerator::Mouse] == 0);152 assert(devices_[InputDeviceEnumerator::Keyboard] == 0);151 assert(devices_[InputDeviceEnumerator::Mouse] == nullptr); 152 assert(devices_[InputDeviceEnumerator::Keyboard] == nullptr); 153 153 assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick); 154 154 … … 294 294 295 295 // Reset console commands 296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject( 0);297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject( 0);296 ModifyConsoleCommand(__CC_InputManager_name, __CC_calibrate_name).setObject(nullptr); 297 ModifyConsoleCommand(__CC_InputManager_name, __CC_reload_name).setObject(nullptr); 298 298 299 299 orxout(internal_status, context::input) << "InputManager: Destruction complete." << endl; … … 316 316 const std::string& className = device->getClassName(); 317 317 delete device; 318 device = 0;318 device = nullptr; 319 319 orxout(verbose, context::input) << className << " destroyed." << endl; 320 320 } … … 526 526 { 527 527 if (name.empty()) 528 return 0;528 return nullptr; 529 529 if (statesByName_.find(name) == statesByName_.end()) 530 530 { … … 539 539 orxout(internal_warning, context::input) << "Could not add an InputState with the same priority '" 540 540 << static_cast<int>(priority) << "' != 0." << endl; 541 return 0;541 return nullptr; 542 542 } 543 543 } … … 551 551 { 552 552 orxout(internal_warning, context::input) << "Could not add an InputState with the same name '" << name << "'." << endl; 553 return 0;553 return nullptr; 554 554 } 555 555 } … … 561 561 return it->second; 562 562 else 563 return 0;563 return nullptr; 564 564 } 565 565 -
code/branches/cpp11_v2/src/libraries/core/input/InputState.cc
r10765 r10768 40 40 , bExpired_(true) 41 41 , handlers_(2) 42 , joyStickHandlerAll_( 0)43 , enterFunctor_( 0)44 , leaveFunctor_( 0)42 , joyStickHandlerAll_(nullptr) 43 , enterFunctor_(nullptr) 44 , leaveFunctor_(nullptr) 45 45 { 46 46 if (priority >= InputStatePriority::HighPriority || priority == InputStatePriority::Empty) -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
r10765 r10768 439 439 { 440 440 delete[] button->commands_[mode_index]; 441 button->commands_[mode_index] = 0;441 button->commands_[mode_index] = nullptr; 442 442 } 443 443 -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
r10765 r10768 80 80 81 81 // Reset console commands 82 ModifyConsoleCommand(__CC_keybind_name ).setObject( 0);83 ModifyConsoleCommand(__CC_tkeybind_name).setObject( 0);84 ModifyConsoleCommand(__CC_unbind_name ).setObject( 0);85 ModifyConsoleCommand(__CC_tunbind_name ).setObject( 0);82 ModifyConsoleCommand(__CC_keybind_name ).setObject(nullptr); 83 ModifyConsoleCommand(__CC_tkeybind_name).setObject(nullptr); 84 ModifyConsoleCommand(__CC_unbind_name ).setObject(nullptr); 85 ModifyConsoleCommand(__CC_tunbind_name ).setObject(nullptr); 86 86 } 87 87 -
code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc
r10624 r10768 68 68 { 69 69 #ifdef ORXONOX_PLATFORM_LINUX 70 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject( 0);71 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject( 0);70 ModifyConsoleCommand(__CC_Mouse_name, __CC_grab_name).setObject(nullptr); 71 ModifyConsoleCommand(__CC_Mouse_name, __CC_ungrab_name).setObject(nullptr); 72 72 #endif 73 73 } -
code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc
r10540 r10768 38 38 //----------------------------------------------------------------------- 39 39 //! Static pointer to the singleton 40 DynLibManager* DynLibManager::singletonPtr_s = 0;40 DynLibManager* DynLibManager::singletonPtr_s = nullptr; 41 41 42 42 //----------------------------------------------------------------------- -
code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
r10765 r10768 46 46 SetConsoleCommand("PluginManager", __CC_PluginManager_unload_name, &PluginManager::unloadPlugin); 47 47 48 PluginManager* PluginManager::singletonPtr_s = 0;48 PluginManager* PluginManager::singletonPtr_s = nullptr; 49 49 50 50 PluginManager::PluginManager() -
code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc
r10542 r10768 33 33 namespace orxonox 34 34 { 35 StaticInitializationManager* StaticInitializationManager::singletonPtr_s = 0;35 StaticInitializationManager* StaticInitializationManager::singletonPtr_s = nullptr; 36 36 37 37 void StaticInitializationManager::addHandler(StaticInitializationHandler* handler) -
code/branches/cpp11_v2/src/libraries/core/object/Context.cc
r10765 r10768 40 40 RegisterClass(Context); 41 41 42 Context* Context::rootContext_s = 0;42 Context* Context::rootContext_s = nullptr; 43 43 44 44 Context* getContextForInitializationOfOtherContexts() -
code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc
r9975 r10768 58 58 ObjectListBase::ObjectListBase() 59 59 { 60 this->first_ = 0;61 this->last_ = 0;60 this->first_ = nullptr; 61 this->last_ = nullptr; 62 62 this->size_ = 0; 63 63 } … … 73 73 ObjectListBaseElement* next = current->next_; 74 74 75 current->list_ = 0;76 current->next_ = 0;77 current->prev_ = 0;75 current->list_ = nullptr; 76 current->next_ = nullptr; 77 current->prev_ = nullptr; 78 78 79 79 current = next; … … 155 155 this->first_ = element->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list 156 156 157 element->list_ = 0;158 element->next_ = 0;159 element->prev_ = 0;157 element->list_ = nullptr; 158 element->next_ = nullptr; 159 element->prev_ = nullptr; 160 160 --this->size_; 161 161 } -
code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.h
r10736 r10768 57 57 @param objectBase The object to store 58 58 */ 59 ObjectListBaseElement(Listable* object) : next_( 0), prev_(0), objectBase_(object), list_(0) {}59 ObjectListBaseElement(Listable* object) : next_(nullptr), prev_(nullptr), objectBase_(object), list_(nullptr) {} 60 60 virtual ~ObjectListBaseElement() { this->removeFromList(); } 61 61 … … 136 136 inline ObjectListBaseElement* begin() const { return this->first_; } 137 137 /// Returns a pointer to the element after the last element in the list. Works only with Iterator. 138 inline ObjectListBaseElement* end() const { return 0; }138 inline ObjectListBaseElement* end() const { return nullptr; } 139 139 /// Returns a pointer to the last element in the list. Works only with Iterator. 140 140 inline ObjectListBaseElement* rbegin() const { return this->last_; } 141 141 /// Returns a pointer to the element in front of the first element in the list. Works only with Iterator. 142 inline ObjectListBaseElement* rend() const { return 0; }142 inline ObjectListBaseElement* rend() const { return nullptr; } 143 143 144 144 inline void registerRemovalListener(ObjectListElementRemovalListener* listener) { this->listeners_.push_back(listener); } -
code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h
r10765 r10768 138 138 public: 139 139 /// Constructor: Initializes the strong pointer with a null pointer. 140 inline StrongPtr() : pointer_( 0), base_(0)140 inline StrongPtr() : pointer_(nullptr), base_(nullptr) 141 141 { 142 142 } … … 237 237 inline T* operator->() const 238 238 { 239 assert(this->pointer_ != 0);239 assert(this->pointer_ != nullptr); 240 240 return this->pointer_; 241 241 } … … 244 244 inline T& operator*() const 245 245 { 246 assert(this->pointer_ != 0);246 assert(this->pointer_ != nullptr); 247 247 return *this->pointer_; 248 248 } … … 251 251 inline bool operator!() const 252 252 { 253 return (this->pointer_ == 0);253 return (this->pointer_ == nullptr); 254 254 } 255 255 -
code/branches/cpp11_v2/src/libraries/core/object/WeakPtr.h
r10765 r10768 100 100 public: 101 101 /// Constructor: Initializes the weak pointer with a null pointer. 102 inline WeakPtr() : pointer_( 0), base_(0), callback_(0)102 inline WeakPtr() : pointer_(nullptr), base_(nullptr), callback_(nullptr) 103 103 { 104 104 } 105 105 106 106 /// Constructor: Initializes the weak pointer with a pointer to an object. 107 inline WeakPtr(T* pointer) : pointer_(pointer), base_(pointer), callback_( 0)107 inline WeakPtr(T* pointer) : pointer_(pointer), base_(pointer), callback_(nullptr) 108 108 { 109 109 this->registerAsDestructionListener(this->base_); … … 111 111 112 112 /// Copy-constructor 113 inline WeakPtr(const WeakPtr& other) : pointer_(other.pointer_), base_(other.base_), callback_( 0)113 inline WeakPtr(const WeakPtr& other) : pointer_(other.pointer_), base_(other.base_), callback_(nullptr) 114 114 { 115 115 this->registerAsDestructionListener(this->base_); … … 118 118 /// Copy-constructor for weak pointers to objects of another class. 119 119 template <class O> 120 inline WeakPtr(const WeakPtr<O>& other) : pointer_(other.get()), base_(other.getBase()), callback_( 0)120 inline WeakPtr(const WeakPtr<O>& other) : pointer_(other.get()), base_(other.getBase()), callback_(nullptr) 121 121 { 122 122 this->registerAsDestructionListener(this->base_); … … 172 172 inline T* operator->() const 173 173 { 174 assert(this->pointer_ != 0);174 assert(this->pointer_ != nullptr); 175 175 return this->pointer_; 176 176 } … … 179 179 inline T& operator*() const 180 180 { 181 assert(this->pointer_ != 0);181 assert(this->pointer_ != nullptr); 182 182 return *this->pointer_; 183 183 } … … 186 186 inline bool operator!() const 187 187 { 188 return (this->pointer_ == 0);188 return (this->pointer_ == nullptr); 189 189 } 190 190 … … 232 232 inline void objectDeleted() 233 233 { 234 this->base_ = 0;235 this->pointer_ = 0;234 this->base_ = nullptr; 235 this->pointer_ = nullptr; 236 236 if (this->callback_) 237 237 (*this->callback_)(); -
code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc
r10542 r10768 38 38 namespace orxonox 39 39 { 40 ScopeManager* ScopeManager::singletonPtr_s = 0;40 ScopeManager* ScopeManager::singletonPtr_s = nullptr; 41 41 42 42 void ScopeManager::addScope(ScopeID::Value scope) -
code/branches/cpp11_v2/src/libraries/network/Connection.cc
r8858 r10768 46 46 47 47 Connection::Connection(uint32_t firstPeerID): 48 host_( 0), bCommunicationThreadRunning_(false), nextPeerID_(firstPeerID)48 host_(nullptr), bCommunicationThreadRunning_(false), nextPeerID_(firstPeerID) 49 49 { 50 50 enet_initialize(); … … 81 81 { 82 82 // this->overallMutex_->lock(); 83 outgoingEvent outEvent = { peerID, outgoingEventType::disconnectPeer, 0, 0 };83 outgoingEvent outEvent = { peerID, outgoingEventType::disconnectPeer, nullptr, 0 }; 84 84 85 85 this->outgoingEventsMutex_->lock(); … … 91 91 void Connection::disconnectPeers() 92 92 { 93 outgoingEvent outEvent = { 0, outgoingEventType::disconnectPeers, 0, 0 };93 outgoingEvent outEvent = { 0, outgoingEventType::disconnectPeers, nullptr, 0 }; 94 94 95 95 this->outgoingEventsMutex_->lock(); … … 323 323 324 324 // create new peerEvent and return it 325 incomingEvent inEvent = { peerID, incomingEventType::peerConnect, 0};325 incomingEvent inEvent = { peerID, incomingEventType::peerConnect, nullptr }; 326 326 return inEvent; 327 327 } … … 338 338 339 339 // create new peerEvent and return it 340 incomingEvent inEvent = { peerID, incomingEventType::peerDisconnect, 0};340 incomingEvent inEvent = { peerID, incomingEventType::peerDisconnect, nullptr }; 341 341 return inEvent; 342 342 } -
code/branches/cpp11_v2/src/libraries/network/GamestateHandler.cc
r7801 r10768 32 32 namespace orxonox { 33 33 34 // GamestateHandler *GamestateHandler::instance_= 0;34 // GamestateHandler *GamestateHandler::instance_=nullptr; 35 35 36 36 GamestateHandler::GamestateHandler() -
code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc
r8858 r10768 60 60 { 61 61 GamestateManager::GamestateManager() : 62 currentGamestate_( 0), id_(0)62 currentGamestate_(nullptr), id_(0) 63 63 { 64 64 // trafficControl_ = new TrafficControl(); … … 140 140 141 141 bool GamestateManager::getSnapshot(){ 142 if ( currentGamestate_ != 0)142 if ( currentGamestate_ != nullptr ) 143 143 delete currentGamestate_; 144 144 uint8_t gsMode; … … 165 165 { //we have no data to send 166 166 delete currentGamestate_; 167 currentGamestate_= 0;167 currentGamestate_=nullptr; 168 168 return false; 169 169 } … … 191 191 unsigned int lastAckedGamestateID = peerIt->second.lastAckedGamestateID; 192 192 193 packet::Gamestate* baseGamestate= 0;193 packet::Gamestate* baseGamestate=nullptr; 194 194 if(lastAckedGamestateID != GAMESTATEID_INITIAL) 195 195 { … … 200 200 } 201 201 202 peerGamestates.push_back( 0); // insert an empty gamestate* to be changed202 peerGamestates.push_back(nullptr); // insert an empty gamestate* to be changed 203 203 finishGamestate( peerID, peerGamestates.back(), baseGamestate, currentGamestate_ ); 204 if( peerGamestates.back()== 0)204 if( peerGamestates.back()==nullptr ) 205 205 // nothing to send to remove pointer from vector 206 206 peerGamestates.pop_back(); … … 243 243 { 244 244 delete diffed1; 245 destgamestate = 0;245 destgamestate = nullptr; 246 246 return; 247 247 } -
code/branches/cpp11_v2/src/libraries/network/Host.cc
r10624 r10768 44 44 SetConsoleCommand(__CC_printRTT_group, __CC_printRTT_name, &Host::printRTT); 45 45 46 // Host* Host::instance_= 0;46 // Host* Host::instance_=nullptr; 47 47 uint32_t Host::clientID_s=0; 48 48 // uint32_t Host::shipID_s=-1; … … 54 54 Host::Host() 55 55 { 56 // assert(instance_== 0);56 // assert(instance_==nullptr); 57 57 instances_s.push_back(this); 58 58 ModifyConsoleCommand(__CC_printRTT_group, __CC_printRTT_name).setObject(this); … … 62 62 63 63 /** 64 * @brief Destructor: resets the instance pointer to 064 * @brief Destructor: resets the instance pointer to nullptr 65 65 */ 66 66 Host::~Host() … … 68 68 assert( std::find( instances_s.begin(), instances_s.end(), this )!=instances_s.end() ); 69 69 instances_s.erase(std::find( instances_s.begin(), instances_s.end(), this )); 70 ModifyConsoleCommand(__CC_printRTT_group, __CC_printRTT_name).setObject( 0);70 ModifyConsoleCommand(__CC_printRTT_group, __CC_printRTT_name).setObject(nullptr); 71 71 } 72 72 … … 135 135 ++it; 136 136 } 137 return 0;137 return nullptr; 138 138 } 139 139 -
code/branches/cpp11_v2/src/libraries/network/LANDiscoverable.cc
r10765 r10768 51 51 this->setConfigValues(); 52 52 // this->setActivity(true); 53 this->host_ = 0;53 this->host_ = nullptr; 54 54 this->bActive_ = false; 55 55 } … … 83 83 bindAddress.host = ENET_HOST_ANY; 84 84 bindAddress.port = LAN_DISCOVERY_PORT; 85 assert( this->host_ == 0);85 assert( this->host_ == nullptr ); 86 86 this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 ); 87 87 if ( this->host_ == nullptr ) … … 91 91 { 92 92 enet_host_destroy( this->host_ ); 93 this->host_ = 0;93 this->host_ = nullptr; 94 94 } 95 95 this->bActive_ = bActive; -
code/branches/cpp11_v2/src/libraries/network/NetworkFunction.h
r10624 r10768 144 144 inline bool call(uint32_t objectID) 145 145 { 146 if ( Synchronisable::getSynchronisable(objectID)!= 0)146 if ( Synchronisable::getSynchronisable(objectID)!=nullptr ) 147 147 { 148 148 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID))); … … 154 154 inline bool call(uint32_t objectID, const MultiType& mt1) 155 155 { 156 if ( Synchronisable::getSynchronisable(objectID)!= 0)156 if ( Synchronisable::getSynchronisable(objectID)!=nullptr ) 157 157 { 158 158 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1); … … 164 164 inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2) 165 165 { 166 if ( Synchronisable::getSynchronisable(objectID)!= 0)166 if ( Synchronisable::getSynchronisable(objectID)!=nullptr ) 167 167 { 168 168 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2); … … 174 174 inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3) 175 175 { 176 if ( Synchronisable::getSynchronisable(objectID)!= 0)176 if ( Synchronisable::getSynchronisable(objectID)!=nullptr ) 177 177 { 178 178 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3); … … 184 184 inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4) 185 185 { 186 if ( Synchronisable::getSynchronisable(objectID)!= 0)186 if ( Synchronisable::getSynchronisable(objectID)!=nullptr ) 187 187 { 188 188 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4); … … 194 194 inline bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5) 195 195 { 196 if ( Synchronisable::getSynchronisable(objectID)!= 0)196 if ( Synchronisable::getSynchronisable(objectID)!=nullptr ) 197 197 { 198 198 (*this->functor_)(orxonox_cast<T*>(Synchronisable::getSynchronisable(objectID)), mt1, mt2, mt3, mt4, mt5); -
code/branches/cpp11_v2/src/libraries/network/NetworkFunctionManager.cc
r10765 r10768 32 32 namespace orxonox 33 33 { 34 NetworkFunctionManager* NetworkFunctionManager::singletonPtr_s = 0;34 NetworkFunctionManager* NetworkFunctionManager::singletonPtr_s = nullptr; 35 35 36 36 void NetworkFunctionManager::registerFunction(NetworkFunctionBase* function) -
code/branches/cpp11_v2/src/libraries/network/Server.cc
r10765 r10768 194 194 void Server::printRTT() 195 195 { 196 // for( ClientInformation* temp=ClientInformation::getBegin(); temp!= 0; temp=temp->next() )196 // for( ClientInformation* temp=ClientInformation::getBegin(); temp!=nullptr; temp=temp->next() ) 197 197 // orxout(message) << "Round trip time to client with ID: " << temp->getID() << " is " << temp->getRTT() << " ms" << endl; 198 198 } -
code/branches/cpp11_v2/src/libraries/network/TrafficControl.cc
r9667 r10768 64 64 *Initializing protected members 65 65 */ 66 TrafficControl *TrafficControl::instance_= 0;66 TrafficControl *TrafficControl::instance_=nullptr; 67 67 68 68 /** … … 72 72 { 73 73 RegisterObject(TrafficControl); 74 assert(instance_== 0);74 assert(instance_==nullptr); 75 75 instance_=this; 76 76 this->setConfigValues(); … … 78 78 79 79 /** 80 * @brief Destructor: resets the instance pointer to 080 * @brief Destructor: resets the instance pointer to nullptr 81 81 */ 82 82 TrafficControl::~TrafficControl() 83 83 { 84 instance_= 0;84 instance_=nullptr; 85 85 } 86 86 -
code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc
r10765 r10768 106 106 { 107 107 uint32_t tempsize=0, currentsize=0; 108 assert(data_== 0);108 assert(data_==nullptr); 109 109 uint32_t size = calcGamestateSize(id, mode); 110 110 -
code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.h
r7801 r10768 54 54 { 55 55 public: 56 GamestateHeader(){ data_= 0; }56 GamestateHeader(){ data_=nullptr; } 57 57 GamestateHeader(uint8_t* data) 58 58 { assert(data); data_ = data; *(uint32_t*)data_ = Type::Gamestate; } -
code/branches/cpp11_v2/src/libraries/network/packet/Packet.cc
r10765 r10768 69 69 packetDirection_ = Direction::Outgoing; 70 70 peerID_=0; 71 data_= 0;72 enetPacket_= 0;71 data_=nullptr; 72 enetPacket_=nullptr; 73 73 bDataENetAllocated_ = false; 74 74 } … … 80 80 peerID_=peerID; 81 81 data_=data; 82 enetPacket_= 0;82 enetPacket_=nullptr; 83 83 bDataENetAllocated_ = false; 84 84 } … … 95 95 memcpy(data_, p.data_, p.getSize()); 96 96 }else 97 data_= 0;97 data_=nullptr; 98 98 bDataENetAllocated_ = p.bDataENetAllocated_; 99 99 } … … 175 175 #endif 176 176 // ENetPacket *temp = enetPacket_; 177 // enetPacket_ = 0; // otherwise we have a double free because enet already handles the deallocation of the packet177 // enetPacket_ = nullptr; // otherwise we have a double free because enet already handles the deallocation of the packet 178 178 if( this->flags_ & PacketFlag::Reliable ) 179 179 host->addPacket( enetPacket_, peerID_, NETWORK_CHANNEL_DEFAULT); … … 191 191 // if( peerID==static_cast<unsigned int>(-2)) 192 192 // peerID = NETWORK_PEER_ID_SERVER; 193 Packet *p = 0;193 Packet *p = nullptr; 194 194 // orxout(verbose_ultra, context::packets) << "packet type: " << *(Type::Value *)&data[_PACKETID] << endl; 195 195 switch( *(Type::Value *)(data + _PACKETID) ) … … 251 251 assert(it != packetMap_.end()); 252 252 // Make sure we don't delete it again in the destructor 253 it->second->enetPacket_ = 0;253 it->second->enetPacket_ = nullptr; 254 254 delete it->second; 255 255 packetMap_.erase(it); -
code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
r10765 r10768 140 140 { 141 141 mem += header.getDataSize() + header.getSize(); 142 return 0;142 return nullptr; 143 143 } 144 144 // assert( !header.isDiffed() ); … … 156 156 } 157 157 assert(id); 158 Context* context = 0;158 Context* context = nullptr; 159 159 if (header.getContextID() != OBJECTID_UNKNOWN) 160 160 { … … 164 164 mem += header.getDataSize()+SynchronisableHeader::getSize(); //.TODO: this suckz.... remove size from header 165 165 assert(0); // TODO: uncomment this if we have a clean objecthierarchy (with destruction of children of objects) ^^ 166 return 0;166 return nullptr; 167 167 } 168 168 else … … 172 172 context = Context::getRootContext(); 173 173 174 assert(getSynchronisable(header.getObjectID())== 0); //make sure no object with this id exists174 assert(getSynchronisable(header.getObjectID())==nullptr); //make sure no object with this id exists 175 175 BaseObject *bo = orxonox_cast<BaseObject*>(id->fabricate(context)); 176 176 assert(bo); -
code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.h
r9667 r10768 171 171 protected: 172 172 Synchronisable(Context* context); 173 template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb= 0, bool bidirectional=false);174 template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb= 0, bool bidirectional=false);173 template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=nullptr, bool bidirectional=false); 174 template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=nullptr, bool bidirectional=false); 175 175 template <class T> void unregisterVariable(T& var); 176 176 -
code/branches/cpp11_v2/src/libraries/network/synchronisable/SynchronisableVariable.h
r10624 r10768 71 71 { 72 72 public: 73 SynchronisableVariable(T& variable, uint8_t syncDirection=VariableDirection::ToClient, NetworkCallbackBase *cb= 0);73 SynchronisableVariable(T& variable, uint8_t syncDirection=VariableDirection::ToClient, NetworkCallbackBase *cb=nullptr); 74 74 virtual ~SynchronisableVariable(); 75 75 … … 89 89 { 90 90 public: 91 SynchronisableVariableBidirectional(T& variable, uint8_t master=Bidirectionality::ServerMaster, NetworkCallbackBase *cb= 0);91 SynchronisableVariableBidirectional(T& variable, uint8_t master=Bidirectionality::ServerMaster, NetworkCallbackBase *cb=nullptr); 92 92 virtual ~SynchronisableVariableBidirectional(); 93 93 -
code/branches/cpp11_v2/src/libraries/tools/BillboardSet.cc
r8858 r10768 46 46 BillboardSet::BillboardSet() 47 47 { 48 this->billboardSet_ = 0;48 this->billboardSet_ = nullptr; 49 49 } 50 50 … … 81 81 { 82 82 orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl; 83 this->billboardSet_ = 0;83 this->billboardSet_ = nullptr; 84 84 } 85 85 … … 104 104 { 105 105 orxout(internal_error) << "Couldn't load billboard \"" << file << '"' << endl; 106 this->billboardSet_ = 0;106 this->billboardSet_ = nullptr; 107 107 } 108 108 … … 114 114 if (this->billboardSet_ && this->scenemanager_) 115 115 this->scenemanager_->destroyBillboardSet(this->billboardSet_); 116 this->billboardSet_ = 0;116 this->billboardSet_ = nullptr; 117 117 } 118 118 -
code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc
r10262 r10768 21 21 { 22 22 DebugDrawer::DebugDrawer(Ogre::SceneManager *_sceneManager, float _fillAlpha) : 23 sceneManager(_sceneManager), fillAlpha(_fillAlpha), manualObject( 0), isEnabled(true), linesIndex(0), trianglesIndex(0)23 sceneManager(_sceneManager), fillAlpha(_fillAlpha), manualObject(nullptr), isEnabled(true), linesIndex(0), trianglesIndex(0) 24 24 { 25 25 initialise(); -
code/branches/cpp11_v2/src/libraries/tools/Mesh.cc
r8858 r10768 44 44 Mesh::Mesh() 45 45 { 46 this->entity_ = 0;46 this->entity_ = nullptr; 47 47 this->bCastShadows_ = true; 48 48 } … … 73 73 { 74 74 orxout(internal_error) << "Couldn't load mesh \"" << meshsource << '"' << endl; 75 this->entity_ = 0;75 this->entity_ = nullptr; 76 76 } 77 77 } -
code/branches/cpp11_v2/src/libraries/tools/ParticleInterface.cc
r10624 r10768 59 59 60 60 this->scenemanager_ = scenemanager; 61 this->particleSystem_ = 0;61 this->particleSystem_ = nullptr; 62 62 63 63 this->bEnabled_ = true; … … 80 80 { 81 81 orxout(internal_error) << "Couldn't load particle system \"" << templateName << '"' << endl; 82 this->particleSystem_ = 0;82 this->particleSystem_ = nullptr; 83 83 } 84 84 } … … 110 110 } 111 111 else 112 return 0;112 return nullptr; 113 113 } 114 114 Ogre::ParticleEmitter* ParticleInterface::getEmitter(unsigned int emitterNr) const … … 117 117 return this->particleSystem_->getEmitter(emitterNr); 118 118 else 119 return 0;119 return nullptr; 120 120 } 121 121 void ParticleInterface::removeEmitter(unsigned int emitterNr) … … 142 142 return this->particleSystem_->addAffector(name); 143 143 else 144 return 0;144 return nullptr; 145 145 } 146 146 Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr) … … 149 149 return this->particleSystem_->getAffector(affectorNr); 150 150 else 151 return 0;151 return nullptr; 152 152 } 153 153 void ParticleInterface::removeAffector(unsigned int affectorNr) -
code/branches/cpp11_v2/src/libraries/tools/Shader.cc
r10765 r10768 44 44 @brief Initializes the values and sets the scene manager. 45 45 */ 46 Shader::Shader(Ogre::SceneManager* scenemanager) : compositorInstance_( 0)46 Shader::Shader(Ogre::SceneManager* scenemanager) : compositorInstance_(nullptr) 47 47 { 48 48 RegisterObject(Shader); … … 127 127 Ogre::CompositorManager::getSingleton().removeCompositor(viewport, this->oldcompositorName_); 128 128 this->compositorInstance_->removeListener(this); 129 this->compositorInstance_ = 0;129 this->compositorInstance_ = nullptr; 130 130 } 131 131 if (!this->compositorName_.empty()) -
code/branches/cpp11_v2/src/libraries/tools/Shader.h
r10727 r10768 48 48 { 49 49 public: 50 Shader(Ogre::SceneManager* scenemanager = 0);50 Shader(Ogre::SceneManager* scenemanager = nullptr); 51 51 virtual ~Shader(); 52 52 -
code/branches/cpp11_v2/src/libraries/tools/Timer.cc
r10624 r10768 163 163 void Timer::init() 164 164 { 165 this->executor_ = 0;165 this->executor_ = nullptr; 166 166 this->interval_ = 0; 167 167 this->bLoop_ = false; -
code/branches/cpp11_v2/src/libraries/util/Math.h
r10742 r10768 200 200 template <> inline long double zeroise<long double>() { return 0; } 201 201 template <> inline bool zeroise<bool>() { return 0; } 202 template <> inline void* zeroise<void*>() { return 0; }202 template <> inline void* zeroise<void*>() { return nullptr; } 203 203 template <> inline std::string zeroise<std::string>() { return std::string(); } 204 204 template <> inline orxonox::Radian zeroise<orxonox::Radian>() { return orxonox::Radian(0.0f); } -
code/branches/cpp11_v2/src/libraries/util/MultiType.h
r10197 r10768 266 266 267 267 /// Default constructor: Assigns no value and no type. The type will be determined by the first assignment of a value. 268 inline MultiType() : value_( 0) { }268 inline MultiType() : value_(nullptr) { } 269 269 /// Constructor: Assigns the given value and sets the type. 270 270 template <typename V> 271 inline MultiType(const V& value) : value_( 0) { this->set(value); }271 inline MultiType(const V& value) : value_(nullptr) { this->set(value); } 272 272 /// Copyconstructor: Assigns value and type of the other MultiType. 273 inline MultiType(const MultiType& other) : value_( 0) { this->set(other); }273 inline MultiType(const MultiType& other) : value_(nullptr) { this->set(other); } 274 274 275 275 /// Destructor: Deletes the MT_Value. … … 325 325 if (this->value_) 326 326 delete this->value_; 327 this->value_ = (other.value_) ? other.value_->clone() : 0;327 this->value_ = (other.value_) ? other.value_->clone() : nullptr; 328 328 } 329 329 … … 332 332 333 333 /// Resets value and type. Type will be void afterwards and null() returns true. 334 inline void reset() { if (this->value_) delete this->value_; this->value_ = 0; }334 inline void reset() { if (this->value_) delete this->value_; this->value_ = nullptr; } 335 335 /// Resets the value and changes the internal type to T. 336 336 template <typename T> inline void reset() { this->assignValue(typename Loki::TypeTraits<T>::UnqualifiedReferredType()); } … … 486 486 template <> inline long double MultiType::get() const { return (this->value_ ? this->value_->get<long double>() : 0); } 487 487 template <> inline bool MultiType::get() const { return (this->value_ ? this->value_->get<bool>() : 0); } 488 template <> inline void* MultiType::get() const { return (this->value_ ? this->value_->get<void*>() : 0); }488 template <> inline void* MultiType::get() const { return (this->value_ ? this->value_->get<void*>() : nullptr); } 489 489 template <> inline std::string MultiType::get() const { return (this->value_ ? this->value_->get<std::string>() : NilValue<std::string>()); } 490 490 template <> inline orxonox::Vector2 MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Vector2>() : NilValue<orxonox::Vector2>()); } -
code/branches/cpp11_v2/src/libraries/util/MultiTypeValue.h
r9550 r10768 77 77 inline bool getValue(long double* value) const { return convertValue<T, long double >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match. 78 78 inline bool getValue(bool* value) const { return convertValue<T, bool >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match. 79 inline bool getValue(void** value) const { return convertValue<T, void* >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.79 inline bool getValue(void** value) const { return convertValue<T, void* >(value, value_, nullptr); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match. 80 80 inline bool getValue(std::string* value) const { return convertValue<T, std::string >(value, value_, NilValue<std::string> ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match. 81 81 inline bool getValue(orxonox::Vector2* value) const { return convertValue<T, orxonox::Vector2 >(value, value_, NilValue<orxonox::Vector2> ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match. -
code/branches/cpp11_v2/src/libraries/util/SharedPtr.h
r10765 r10768 216 216 public: 217 217 /// Default constructor, the pointer is set to nullptr. 218 inline SharedPtr() : pointer_( 0), counter_(0)218 inline SharedPtr() : pointer_(nullptr), counter_(nullptr) 219 219 { 220 220 } 221 221 222 222 /// Constructor, creates a SharedPtr that points to @a pointer, increments the counter. 223 inline SharedPtr(T* pointer) : pointer_(pointer), counter_( 0)223 inline SharedPtr(T* pointer) : pointer_(pointer), counter_(nullptr) 224 224 { 225 225 if (this->pointer_) … … 293 293 inline T* operator->() const 294 294 { 295 assert(this->pointer_ != 0);295 assert(this->pointer_ != nullptr); 296 296 return this->pointer_; 297 297 } … … 300 300 inline T& operator*() const 301 301 { 302 assert(this->pointer_ != 0);302 assert(this->pointer_ != nullptr); 303 303 return *this->pointer_; 304 304 } … … 313 313 inline operator bool() const 314 314 { 315 return (this->pointer_ != 0);315 return (this->pointer_ != nullptr); 316 316 } 317 317 -
code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc
r10765 r10768 127 127 } 128 128 // if the signalhandler has already been destroyed then don't do anything 129 if( SignalHandler::singletonPtr_s == 0)129 if( SignalHandler::singletonPtr_s == nullptr ) 130 130 { 131 131 orxout(user_error) << "Received signal " << sigName.c_str() << endl << "Can't write backtrace because SignalHandler is already destroyed" << endl; … … 430 430 431 431 // if the signalhandler has already been destroyed then don't do anything 432 if (SignalHandler::singletonPtr_s == 0)432 if (SignalHandler::singletonPtr_s == nullptr) 433 433 { 434 434 orxout(user_error) << "Caught an unhandled exception" << endl << "Can't write backtrace because SignalHandler is already destroyed" << endl; -
code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc
r10765 r10768 45 45 this->chunkSize_ = std::max(objectSize, sizeof(Chunk)); // the chunk's size will be the maximum of the object's size and the size of a Chunk object itself 46 46 this->numChunksPerBlock_ = numObjects; 47 this->first_ = 0;47 this->first_ = nullptr; 48 48 } 49 49 … … 98 98 99 99 // the next_ pointer of the last chunk must point to nullptr 100 setNext(block + (this->numChunksPerBlock_ - 1) * this->chunkSize_, 0);100 setNext(block + (this->numChunksPerBlock_ - 1) * this->chunkSize_, nullptr); 101 101 102 102 // The second chunk in the block is assigned to the first_ pointer -
code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc
r9550 r10768 57 57 58 58 this->isInitialized_ = false; 59 this->memoryWriterInstance_ = 0;60 this->consoleWriterInstance_ = 0;61 this->logWriterInstance_ = 0;59 this->memoryWriterInstance_ = nullptr; 60 this->consoleWriterInstance_ = nullptr; 61 this->logWriterInstance_ = nullptr; 62 62 63 63 // register 'undefined' context in order to give it always the first context-ID -
code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.cc
r10765 r10768 59 59 comboTimer.setTimer(3.0f, true, createExecutor(createFunctor(&DodgeRace::comboControll, this))); 60 60 this->numberOfBots_ = 0; //sets number of default bots temporarly to 0 61 this->center_ = 0;61 this->center_ = nullptr; 62 62 63 63 this->setHUDTemplate("DodgeRaceHUD"); -
code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceHUDinfo.cc
r10624 r10768 40 40 RegisterObject(DodgeRaceHUDinfo); 41 41 42 this->DodgeRaceGame = 0;42 this->DodgeRaceGame = nullptr; 43 43 this->bShowPoints_ = true; 44 44 } … … 86 86 else 87 87 { 88 this->DodgeRaceGame = 0;88 this->DodgeRaceGame = nullptr; 89 89 } 90 90 } -
code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc
r10765 r10768 416 416 for (std::vector<StaticEntity*>::const_iterator it = allObjects.begin(); it != allObjects.end(); ++it) 417 417 { 418 for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)418 for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != nullptr; everyShape++) 419 419 { 420 420 btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape(); … … 444 444 for (std::vector<StaticEntity*>::iterator it = allObjects.begin(); it != allObjects.end(); ++it) 445 445 { 446 for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)446 for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != nullptr; everyShape++) 447 447 { 448 448 btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape(); … … 540 540 // { orxout()<<"Problempoint 1.1"<<endl; continue;} 541 541 // //TODO: Probably it points on a wrong object 542 // for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!= 0; everyShape++)542 // for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=nullptr; everyShape++) 543 543 // { 544 544 // if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr) … … 572 572 // if((*it)==nullptr) 573 573 // { orxout()<<"Problempoint 1"<<endl; continue;} 574 // for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!= 0; everyShape++)574 // for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=nullptr; everyShape++) 575 575 // { 576 576 // if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr) -
code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc
r10765 r10768 100 100 return this->checkpoints_[index]; 101 101 else 102 return 0;102 return nullptr; 103 103 } 104 104 … … 116 116 if (this->checkpoints_[i]->getCheckpointIndex() == index) 117 117 return this->checkpoints_[i]; 118 return 0;118 return nullptr; 119 119 } 120 120 -
code/branches/cpp11_v2/src/modules/invader/Invader.cc
r10765 r10768 61 61 RegisterObject(Invader); 62 62 this->numberOfBots_ = 0; //sets number of default bots temporarly to 0 63 this->center_ = 0;63 this->center_ = nullptr; 64 64 bEndGame = false; 65 65 lives = 3; -
code/branches/cpp11_v2/src/modules/invader/InvaderHUDinfo.cc
r10733 r10768 40 40 RegisterObject(InvaderHUDinfo); 41 41 42 this->InvaderGame = 0;42 this->InvaderGame = nullptr; 43 43 this->bShowLives_ = false; 44 44 this->bShowLevel_ = false; … … 132 132 else 133 133 { 134 this->InvaderGame = 0;134 this->InvaderGame = nullptr; 135 135 } 136 136 } -
code/branches/cpp11_v2/src/modules/jump/Jump.cc
r10765 r10768 65 65 RegisterObject(Jump); 66 66 67 center_ = 0;68 figure_ = 0;69 camera = 0;67 center_ = nullptr; 68 figure_ = nullptr; 69 camera = nullptr; 70 70 setHUDTemplate("JumpHUD"); 71 71 } … … 270 270 void Jump::cleanup() 271 271 { 272 camera = 0;272 camera = nullptr; 273 273 } 274 274 … … 340 340 else 341 341 { 342 return 0;342 return nullptr; 343 343 } 344 344 } -
code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc
r10765 r10768 51 51 52 52 dead_ = false; 53 figure_ = 0;53 figure_ = nullptr; 54 54 width_ = 0.0; 55 55 height_ = 0.0; -
code/branches/cpp11_v2/src/modules/jump/JumpItem.cc
r10733 r10768 48 48 attachedToFigure_ = false; 49 49 50 figure_ = 0;50 figure_ = nullptr; 51 51 height_ = 0.0; 52 52 width_ = 0.0; -
code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc
r10765 r10768 48 48 RegisterObject(JumpPlatform); 49 49 50 figure_ = 0;50 figure_ = nullptr; 51 51 52 52 setPosition(Vector3(0,0,0)); -
code/branches/cpp11_v2/src/modules/jump/JumpProjectile.cc
r10733 r10768 47 47 RegisterObject(JumpProjectile); 48 48 49 figure_ = 0;49 figure_ = nullptr; 50 50 setPosition(Vector3(0,0,0)); 51 51 setVelocity(Vector3(0,0,250.0)); -
code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc
r10765 r10768 100 100 void JumpSpring::accelerateFigure() 101 101 { 102 if (figure_ != 0)102 if (figure_ != nullptr) 103 103 { 104 104 figure_->JumpFromSpring(this); -
code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc
r10765 r10768 66 66 RegisterObject(Mini4Dgame); 67 67 68 this->board_ = 0;68 this->board_ = nullptr; 69 69 70 70 // Set the type of Bots for this particular Gametype. … … 91 91 { 92 92 //this->board_->destroy(); 93 this->board_ = 0;93 this->board_ = nullptr; 94 94 } 95 95 } -
code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameAI.cc
r10230 r10768 60 60 61 61 this->setConfigValues(); 62 this->center_ = 0;62 this->center_ = nullptr; 63 63 } 64 64 -
code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameBoard.cc
r10765 r10768 64 64 for(int l=0;l<4;l++){ 65 65 this->board[i][j][k][l]=mini4DgamePlayerColor::none; 66 this->blinkingBillboards[i][j][k][l] = 0;66 this->blinkingBillboards[i][j][k][l] = nullptr; 67 67 } 68 68 } … … 97 97 this->board[move.x][move.y][move.z][move.w] = mini4DgamePlayerColor::none; 98 98 this->blinkingBillboards[move.x][move.y][move.z][move.w]->destroy(); 99 this->blinkingBillboards[move.x][move.y][move.z][move.w] = 0;99 this->blinkingBillboards[move.x][move.y][move.z][move.w] = nullptr; 100 100 if(player_toggle_){ 101 101 this->player_toggle_ = false; -
code/branches/cpp11_v2/src/modules/objects/Attacher.cc
r9667 r10768 40 40 RegisterObject(Attacher); 41 41 42 this->target_ = 0;42 this->target_ = nullptr; 43 43 } 44 44 … … 90 90 ++i; 91 91 } 92 return 0;92 return nullptr; 93 93 } 94 94 … … 96 96 { 97 97 this->targetname_ = target; 98 this->target_ = 0;98 this->target_ = nullptr; 99 99 100 100 if (this->targetname_.empty()) -
code/branches/cpp11_v2/src/modules/objects/controllers/TurretController.cc
r10622 r10768 81 81 { 82 82 this->forgetTarget(); 83 turret->setTarget( 0);83 turret->setTarget(nullptr); 84 84 } 85 85 … … 99 99 float minScore = FLT_MAX; 100 100 float tempScore; 101 Pawn* minScorePawn = 0;101 Pawn* minScorePawn = nullptr; 102 102 103 103 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) -
code/branches/cpp11_v2/src/modules/objects/eventsystem/EventDispatcher.cc
r9667 r10768 79 79 ++i; 80 80 } 81 return 0;81 return nullptr; 82 82 } 83 83 } -
code/branches/cpp11_v2/src/modules/objects/eventsystem/EventFilter.cc
r9667 r10768 102 102 ++i; 103 103 } 104 return 0;104 return nullptr; 105 105 } 106 106 … … 119 119 ++i; 120 120 } 121 return 0;121 return nullptr; 122 122 } 123 123 } -
code/branches/cpp11_v2/src/modules/overlays/hud/AnnounceMessage.cc
r9667 r10768 40 40 RegisterObject(AnnounceMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 44 44 this->setDelay(3.0f); -
code/branches/cpp11_v2/src/modules/overlays/hud/CountDown.cc
r9943 r10768 71 71 RegisterObject(CountDown); 72 72 73 this->owner_ = 0;73 this->owner_ = nullptr; 74 74 this->hasStopped_ = false; 75 75 } -
code/branches/cpp11_v2/src/modules/overlays/hud/DeathMessage.cc
r9667 r10768 40 40 RegisterObject(DeathMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 44 44 this->setDelay(2.0f); -
code/branches/cpp11_v2/src/modules/overlays/hud/GametypeFadingMessage.cc
r9667 r10768 40 40 RegisterObject(GametypeFadingMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 this->setDelay(2.0f); 44 44 this->setFadeouttime(0.5f); -
code/branches/cpp11_v2/src/modules/overlays/hud/GametypeStaticMessage.cc
r9667 r10768 42 42 { 43 43 RegisterObject(GametypeStaticMessage); 44 this->owner_ = 0;44 this->owner_ = nullptr; 45 45 } 46 46 -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDBar.cc
r9667 r10768 191 191 return barColours_[index]; 192 192 else 193 return 0;193 return nullptr; 194 194 } 195 195 -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDBoostBar.cc
r9667 r10768 42 42 RegisterObject(HUDBoostBar); 43 43 44 this->owner_ = 0;44 this->owner_ = nullptr; 45 45 this->flashInterval_ = 0.25f; 46 46 this->flashDt_ = 0.0f; -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDEnemyHealthBar.cc
r10765 r10768 41 41 42 42 this->setConfigValues(); 43 this->owner_ = 0;43 this->owner_ = nullptr; 44 44 } 45 45 -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDHealthBar.cc
r9667 r10768 43 43 RegisterObject(HUDHealthBar); 44 44 45 this->owner_ = 0;45 this->owner_ = nullptr; 46 46 this->bUseBarColour_ = false; 47 47 … … 58 58 { 59 59 this->textoverlay_->destroy(); 60 this->textoverlay_ = 0;60 this->textoverlay_ = nullptr; 61 61 } 62 62 } -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc
r10765 r10768 69 69 RegisterClass ( HUDNavigation ); 70 70 71 HUDNavigation* HUDNavigation::localHUD_s = 0;71 HUDNavigation* HUDNavigation::localHUD_s = nullptr; 72 72 73 73 HUDNavigation::HUDNavigation(Context* context) : -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDRadar.cc
r9945 r10768 68 68 this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png"; 69 69 this->shapeMaterials_[RadarViewable::Square] = "RadarSquare.png"; 70 this->owner_ = 0;70 this->owner_ = nullptr; 71 71 72 72 this->map3DFront_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton() -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDSpeedBar.cc
r9667 r10768 43 43 RegisterObject(HUDSpeedBar); 44 44 45 this->owner_ = 0;45 this->owner_ = nullptr; 46 46 } 47 47 -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDTimer.cc
r9667 r10768 42 42 RegisterObject(HUDTimer); 43 43 44 this->owner_ = 0;44 this->owner_ = nullptr; 45 45 } 46 46 -
code/branches/cpp11_v2/src/modules/overlays/hud/KillMessage.cc
r9667 r10768 40 40 RegisterObject(KillMessage); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 44 44 this->setDelay(2.0f); -
code/branches/cpp11_v2/src/modules/overlays/hud/LastManStandingInfos.cc
r10624 r10768 43 43 RegisterObject(LastManStandingInfos); 44 44 45 this->lms_ = 0;46 this->player_ = 0;45 this->lms_ = nullptr; 46 this->player_ = nullptr; 47 47 this->bShowLives_ = false; 48 48 this->bShowPlayers_ = false; … … 91 91 else 92 92 { 93 this->player_ = 0;94 this->lms_ = 0;93 this->player_ = nullptr; 94 this->lms_ = nullptr; 95 95 } 96 96 } -
code/branches/cpp11_v2/src/modules/overlays/hud/LastTeamStandingInfos.cc
r10624 r10768 43 43 RegisterObject(LastTeamStandingInfos); 44 44 45 this->lts_ = 0;46 this->player_ = 0;45 this->lts_ = nullptr; 46 this->player_ = nullptr; 47 47 this->bShowLives_ = false; 48 48 this->bShowTeams_ = false; … … 91 91 else 92 92 { 93 this->player_ = 0;94 this->lts_ = 0;93 this->player_ = nullptr; 94 this->lts_ = nullptr; 95 95 } 96 96 } -
code/branches/cpp11_v2/src/modules/overlays/hud/PauseNotice.cc
r9667 r10768 40 40 RegisterObject(PauseNotice); 41 41 42 this->owner_ = 0;42 this->owner_ = nullptr; 43 43 } 44 44 -
code/branches/cpp11_v2/src/modules/overlays/hud/TeamBaseMatchScore.cc
r10624 r10768 43 43 RegisterObject(TeamBaseMatchScore); 44 44 45 this->owner_ = 0;45 this->owner_ = nullptr; 46 46 47 47 this->bShowBases_ = false; … … 120 120 this->owner_ = orxonox_cast<TeamBaseMatch*>(this->getOwner()->getGametype()); 121 121 else 122 this->owner_ = 0;122 this->owner_ = nullptr; 123 123 } 124 124 } -
code/branches/cpp11_v2/src/modules/overlays/stats/CreateLines.cc
r6502 r10768 37 37 CreateLines::CreateLines(float leftOffset, float topOffset, float width, float height) 38 38 { 39 playerNameText_ = new OverlayText( 0);39 playerNameText_ = new OverlayText(nullptr); 40 40 playerNameText_->setTextSize(0.04f); 41 41 playerNameText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f)); 42 42 playerNameText_->setPosition(Vector2(0.1f, topOffset + 0.01f)); 43 43 44 scoreText_ = new OverlayText( 0);44 scoreText_ = new OverlayText(nullptr); 45 45 scoreText_->setTextSize(0.04f); 46 46 scoreText_->setColour(ColourValue(0.0f, 0.75f, 0.2f, 1.0f)); 47 47 scoreText_->setPosition(Vector2(0.6f, topOffset + 0.01f)); 48 48 49 deathsText_ = new OverlayText( 0);49 deathsText_ = new OverlayText(nullptr); 50 50 deathsText_->setTextSize(0.04f); 51 51 deathsText_->setColour(ColourValue(0, 0.75f, 0.2f, 1.0f)); 52 52 deathsText_->setPosition(Vector2(0.8f, topOffset + 0.01f)); 53 53 54 background_ = new Stats( 0);54 background_ = new Stats(nullptr); 55 55 background_->setPosition(Vector2(leftOffset, topOffset)); 56 56 background_->setSize(Vector2(width, height)); -
code/branches/cpp11_v2/src/modules/overlays/stats/Stats.cc
r9667 r10768 46 46 Stats::Stats(Context* context) 47 47 : OrxonoxOverlay(context) 48 , statsOverlayNoise_( 0)49 , statsOverlayBorder_( 0)48 , statsOverlayNoise_(nullptr) 49 , statsOverlayBorder_(nullptr) 50 50 { 51 51 RegisterObject(Stats); -
code/branches/cpp11_v2/src/modules/pong/Pong.cc
r10765 r10768 64 64 RegisterObject(Pong); 65 65 66 this->center_ = 0;67 this->ball_ = 0;68 this->bat_[0] = 0;69 this->bat_[1] = 0;66 this->center_ = nullptr; 67 this->ball_ = nullptr; 68 this->bat_[0] = nullptr; 69 this->bat_[1] = nullptr; 70 70 71 71 this->setHUDTemplate("PongHUD"); … … 106 106 { 107 107 this->ball_->destroy(); 108 this->ball_ = 0;108 this->ball_ = nullptr; 109 109 } 110 110 … … 115 115 { 116 116 this->bat_[0]->destroy(); 117 this->bat_[0] = 0;117 this->bat_[0] = nullptr; 118 118 } 119 119 } … … 329 329 return this->bat_[0]->getPlayer(); 330 330 else 331 return 0;331 return nullptr; 332 332 } 333 333 … … 343 343 return this->bat_[1]->getPlayer(); 344 344 else 345 return 0;345 return nullptr; 346 346 } 347 347 } -
code/branches/cpp11_v2/src/modules/pong/PongAI.cc
r10765 r10768 57 57 RegisterObject(PongAI); 58 58 59 this->ball_ = 0;59 this->ball_ = nullptr; 60 60 this->ballDirection_ = Vector2::ZERO; 61 61 this->ballEndPosition_ = 0; -
code/branches/cpp11_v2/src/modules/pong/PongBall.cc
r10765 r10768 61 61 this->speed_ = 0; 62 62 this->accelerationFactor_ = 1.0f; 63 this->bat_ = 0;63 this->bat_ = nullptr; 64 64 this->bDeleteBats_ = false; 65 65 this->batID_ = new unsigned int[2]; … … 82 82 else 83 83 { 84 this->defScoreSound_ = 0;85 this->defBatSound_ = 0;86 this->defBoundarySound_ = 0;84 this->defScoreSound_ = nullptr; 85 this->defBatSound_ = nullptr; 86 this->defBoundarySound_ = nullptr; 87 87 } 88 88 } -
code/branches/cpp11_v2/src/modules/pong/PongScore.cc
r10765 r10768 55 55 RegisterObject(PongScore); 56 56 57 this->owner_ = 0;57 this->owner_ = nullptr; 58 58 59 59 this->bShowName_ = false; … … 172 172 this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype()); 173 173 else 174 this->owner_ = 0;174 this->owner_ = nullptr; 175 175 } 176 176 } -
code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc
r10765 r10768 106 106 107 107 MultiTriggerContainer * cont = orxonox_cast<MultiTriggerContainer *>(trigger); 108 if(cont == 0)108 if(cont == nullptr) 109 109 return true; 110 110 111 111 DistanceMultiTrigger * originatingTrigger = orxonox_cast<DistanceMultiTrigger *>(cont->getOriginator()); 112 if(originatingTrigger == 0)112 if(originatingTrigger == nullptr) 113 113 { 114 114 return true; … … 116 116 117 117 MobileEntity * entity = orxonox_cast<MobileEntity *>(cont->getData()); 118 if(entity == 0)118 if(entity == nullptr) 119 119 return true; 120 120 -
code/branches/cpp11_v2/src/modules/portals/PortalLink.cc
r9667 r10768 40 40 std::map<PortalEndPoint *, PortalEndPoint *> PortalLink::links_s; 41 41 42 PortalLink::PortalLink(Context* context) : BaseObject(context), fromID_(0), toID_(0), from_( 0), to_(0)42 PortalLink::PortalLink(Context* context) : BaseObject(context), fromID_(0), toID_(0), from_(nullptr), to_(nullptr) 43 43 { 44 44 RegisterObject(PortalLink); … … 67 67 void PortalLink::use(MobileEntity* entity, PortalEndPoint * entrance) 68 68 { 69 if(entrance == 0)69 if(entrance == nullptr) 70 70 return; 71 71 -
code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
r10765 r10768 66 66 RegisterObject(Tetris); 67 67 68 this->activeBrick_ = 0;68 this->activeBrick_ = nullptr; 69 69 70 70 // Pre-set the timer, but don't start it yet. … … 74 74 this->player_ = nullptr; 75 75 this->setHUDTemplate("TetrisHUD"); 76 this->futureBrick_ = 0;76 this->futureBrick_ = nullptr; 77 77 } 78 78 … … 96 96 { 97 97 this->activeBrick_->destroy(); 98 this->activeBrick_ = 0;98 this->activeBrick_ = nullptr; 99 99 } 100 100 if (this->futureBrick_) 101 101 { 102 102 this->futureBrick_->destroy(); 103 this->futureBrick_ = 0;103 this->futureBrick_ = nullptr; 104 104 } 105 105 … … 396 396 // Make the last brick to be created the active brick. 397 397 this->activeBrick_ = this->futureBrick_; 398 this->futureBrick_ = 0;398 this->futureBrick_ = nullptr; 399 399 400 400 // set its position -
code/branches/cpp11_v2/src/modules/tetris/TetrisScore.cc
r10765 r10768 56 56 RegisterObject(TetrisScore); 57 57 58 this->owner_ = 0;58 this->owner_ = nullptr; 59 59 this->player_ = nullptr; 60 60 } … … 120 120 this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype()); 121 121 else 122 this->owner_ = 0;122 this->owner_ = nullptr; 123 123 } 124 124 } -
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseHUDController.cc
r10629 r10768 39 39 { 40 40 RegisterObject(TowerDefenseHUDController); 41 this->td = 0;41 this->td = nullptr; 42 42 } 43 43 … … 89 89 else 90 90 { 91 this->td = 0;91 this->td = nullptr; 92 92 } 93 93 } -
code/branches/cpp11_v2/src/modules/weapons/projectiles/ParticleProjectile.cc
r10624 r10768 58 58 } 59 59 else 60 this->particles_ = 0;60 this->particles_ = nullptr; 61 61 } 62 62 -
code/branches/cpp11_v2/src/modules/weapons/projectiles/Rocket.cc
r10622 r10768 117 117 else 118 118 { 119 this->defSndWpnEngine_ = 0;120 this->defSndWpnLaunch_ = 0;119 this->defSndWpnEngine_ = nullptr; 120 this->defSndWpnLaunch_ = nullptr; 121 121 } 122 122 -
code/branches/cpp11_v2/src/modules/weapons/projectiles/RocketOld.cc
r10622 r10768 117 117 else 118 118 { 119 this->defSndWpnEngine_ = 0;120 this->defSndWpnLaunch_ = 0;119 this->defSndWpnEngine_ = nullptr; 120 this->defSndWpnLaunch_ = nullptr; 121 121 } 122 122 -
code/branches/cpp11_v2/src/orxonox/CameraManager.cc
r10765 r10768 60 60 return this->cameraList_.front(); 61 61 else 62 return 0;62 return nullptr; 63 63 } 64 64 -
code/branches/cpp11_v2/src/orxonox/Level.cc
r10624 r10768 54 54 this->registerVariables(); 55 55 this->xmlfilename_ = this->getFilename(); 56 this->xmlfile_ = 0;56 this->xmlfile_ = nullptr; 57 57 } 58 58 … … 178 178 ++i; 179 179 } 180 return 0;180 return nullptr; 181 181 } 182 182 … … 195 195 return this->lodInformation_.find(meshName)->second; 196 196 197 return 0;197 return nullptr; 198 198 } 199 199 … … 207 207 { 208 208 orxout(internal_info) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl; 209 player->switchGametype( 0);209 player->switchGametype(nullptr); 210 210 } 211 211 } -
code/branches/cpp11_v2/src/orxonox/LevelManager.cc
r10765 r10768 161 161 return this->levels_.front(); 162 162 else 163 return 0;163 return nullptr; 164 164 } 165 165 -
code/branches/cpp11_v2/src/orxonox/PlayerManager.cc
r10624 r10768 62 62 63 63 // create new HumanPlayer instance 64 HumanPlayer* player = new HumanPlayer( 0);64 HumanPlayer* player = new HumanPlayer(nullptr); 65 65 player->setClientID(clientID); 66 66 … … 115 115 return (*it); 116 116 } 117 return 0;117 return nullptr; 118 118 } 119 119 } -
code/branches/cpp11_v2/src/orxonox/Radar.cc
r10624 r10768 49 49 50 50 Radar::Radar() 51 : itFocus_( 0)52 , focus_( 0)51 : itFocus_(nullptr) 52 , focus_(nullptr) 53 53 , objectTypeCounter_(0) 54 54 { … … 106 106 return *(this->itFocus_); 107 107 else 108 return 0;108 return nullptr; 109 109 } 110 110 … … 126 126 { 127 127 // focus object was deleted, release focus 128 this->focus_ = 0;129 this->itFocus_ = 0;128 this->focus_ = nullptr; 129 this->itFocus_ = nullptr; 130 130 } 131 131 … … 141 141 { 142 142 // list is empty 143 this->itFocus_ = 0;144 this->focus_ = 0;143 this->itFocus_ = nullptr; 144 this->focus_ = nullptr; 145 145 } 146 146 … … 156 156 float nextDistance = FLT_MAX; 157 157 float minimumDistance = FLT_MAX; 158 ObjectList<RadarViewable>::iterator itFallback = 0;158 ObjectList<RadarViewable>::iterator itFallback = nullptr; 159 159 160 160 for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it) … … 191 191 void Radar::releaseFocus() 192 192 { 193 this->itFocus_ = 0;194 this->focus_ = 0;193 this->itFocus_ = nullptr; 194 this->focus_ = nullptr; 195 195 } 196 196 -
code/branches/cpp11_v2/src/orxonox/Scene.cc
r10765 r10768 84 84 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 85 85 86 this->radar_ = 0;86 this->radar_ = nullptr; 87 87 } 88 88 … … 92 92 this->positiveWorldRange_ = Vector3::UNIT_SCALE * defaultMaxWorldSize; 93 93 this->gravity_ = Vector3::ZERO; 94 this->physicalWorld_ = 0;95 this->solver_ = 0;96 this->dispatcher_ = 0;97 this->collisionConfig_ = 0;98 this->broadphase_ = 0;94 this->physicalWorld_ = nullptr; 95 this->solver_ = nullptr; 96 this->dispatcher_ = nullptr; 97 this->collisionConfig_ = nullptr; 98 this->broadphase_ = nullptr; 99 99 100 100 this->registerVariables(); … … 234 234 delete this->collisionConfig_; 235 235 delete this->broadphase_; 236 this->physicalWorld_ = 0;237 this->solver_ = 0;238 this->dispatcher_ = 0;239 this->collisionConfig_ = 0;240 this->broadphase_ = 0;236 this->physicalWorld_ = nullptr; 237 this->solver_ = nullptr; 238 this->dispatcher_ = nullptr; 239 this->collisionConfig_ = nullptr; 240 this->broadphase_ = nullptr; 241 241 } 242 242 } … … 327 327 ++i; 328 328 } 329 return 0;329 return nullptr; 330 330 } 331 331 -
code/branches/cpp11_v2/src/orxonox/Scene.h
r10624 r10768 111 111 public: 112 112 inline bool hasPhysics() const 113 { return this->physicalWorld_ != 0; }113 { return this->physicalWorld_ != nullptr; } 114 114 void setPhysicalWorld(bool wantsPhysics); 115 115 -
code/branches/cpp11_v2/src/orxonox/Test.cc
r10624 r10768 54 54 registerMemberNetworkFunction( Test, printBlaBla ); 55 55 56 Test* Test::instance_ = 0;56 Test* Test::instance_ = nullptr; 57 57 58 58 Test::Test(Context* context) : BaseObject(context), Synchronisable(context) 59 59 { 60 assert(instance_== 0);60 assert(instance_==nullptr); 61 61 instance_=this; 62 62 RegisterObject ( Test ); … … 64 64 registerVariables(); 65 65 setSyncMode(0x3); 66 this->pointer_ = 0;66 this->pointer_ = nullptr; 67 67 } 68 68 69 69 Test::~Test() 70 70 { 71 instance_= 0;71 instance_=nullptr; 72 72 } 73 73 -
code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.cc
r10624 r10768 57 57 RegisterObject(CollisionShape); 58 58 59 this->parent_ = 0;59 this->parent_ = nullptr; 60 60 this->parentID_ = OBJECTID_UNKNOWN; 61 this->collisionShape_ = 0;61 this->collisionShape_ = nullptr; 62 62 this->position_ = Vector3::ZERO; 63 63 this->orientation_ = Quaternion::IDENTITY; … … 154 154 void CollisionShape::notifyDetached() 155 155 { 156 this->parent_ = 0;156 this->parent_ = nullptr; 157 157 this->parentID_ = OBJECTID_UNKNOWN; 158 158 } -
code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc
r10765 r10768 197 197 void CompoundCollisionShape::updatePublicShape() 198 198 { 199 btCollisionShape* primitive = 0; // The primitive shape, if there is one.199 btCollisionShape* primitive = nullptr; // The primitive shape, if there is one. 200 200 bool bPrimitive = true; // Whether the CompoundCollisionShape has just one non-empty CollisionShape. And that shape also has no transformation. 201 201 bool bEmpty = true; // Whether the CompoundCollisionShape is empty. … … 221 221 { 222 222 // If there was none all along, nothing needs to be changed. 223 if (this->collisionShape_ == 0)223 if (this->collisionShape_ == nullptr) 224 224 return; 225 this->collisionShape_ = 0;225 this->collisionShape_ = nullptr; 226 226 } 227 227 // If the CompoundCollisionShape is just a primitive. … … 253 253 ++i; 254 254 } 255 return 0;255 return nullptr; 256 256 } 257 257 -
code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.h
r9667 r10768 75 75 void updatePublicShape(); 76 76 inline virtual btCollisionShape* createNewShape() const 77 { assert(false); return 0; }77 { assert(false); return nullptr; } 78 78 79 79 btCompoundShape* compoundShape_; -
code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
r10765 r10768 54 54 CollisionShape::updateParent(); 55 55 56 assert(this->worldEntityOwner_ != 0);56 assert(this->worldEntityOwner_ != nullptr); 57 57 this->worldEntityOwner_->notifyCollisionShapeChanged(); 58 58 } -
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc
r10765 r10768 177 177 { 178 178 this->weaponModes_.clear(); // reset previous weapon information 179 WeaponSlot* wSlot = 0;179 WeaponSlot* wSlot = nullptr; 180 180 for(int l=0; (wSlot = pawn->getWeaponSlot(l)) ; l++) 181 181 { 182 WeaponMode* wMode = 0;182 WeaponMode* wMode = nullptr; 183 183 for(int i=0; (wMode = wSlot->getWeapon()->getWeaponmode(i)) ; i++) 184 184 { … … 249 249 return this->waypoints_[index]; 250 250 else 251 return 0;251 return nullptr; 252 252 } 253 253 -
code/branches/cpp11_v2/src/orxonox/controllers/Controller.cc
r9797 r10768 40 40 RegisterObject(Controller); 41 41 42 this->player_ = 0;43 this->controllableEntity_ = 0;42 this->player_ = nullptr; 43 this->controllableEntity_ = nullptr; 44 44 this->bGodMode_ = false; 45 45 this->team_=-1; -
code/branches/cpp11_v2/src/orxonox/controllers/DroneController.cc
r9667 r10768 49 49 RegisterObject(DroneController); 50 50 51 this->owner_ = 0;52 this->drone_ = 0;51 this->owner_ = nullptr; 52 this->drone_ = nullptr; 53 53 this->isShooting_ = false; 54 54 this->setAccuracy(10); -
code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
r10765 r10768 72 72 RegisterObject(FormationController); 73 73 74 this->target_ = 0;74 this->target_ = nullptr; 75 75 this->formationFlight_ = false; 76 76 this->passive_ = false; 77 77 this->maxFormationSize_ = STANDARD_MAX_FORMATION_SIZE; 78 this->myMaster_ = 0;78 this->myMaster_ = nullptr; 79 79 this->freedomCount_ = 0; 80 80 … … 104 104 { 105 105 orxout(internal_error) << this << " is still master in " << (*it) << endl; 106 it->myMaster_ = 0;106 it->myMaster_ = nullptr; 107 107 } 108 108 … … 142 142 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 143 143 { 144 Controller* controller = 0;144 Controller* controller = nullptr; 145 145 146 146 if (it->getController()) … … 173 173 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 174 174 { 175 Controller* controller = 0;175 Controller* controller = nullptr; 176 176 177 177 if (it->getController()) … … 203 203 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 204 204 { 205 Controller* controller = 0;205 Controller* controller = nullptr; 206 206 207 207 if (it->getController()) … … 230 230 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 231 231 { 232 Controller* controller = 0;232 Controller* controller = nullptr; 233 233 234 234 if (it->getController()) … … 383 383 } 384 384 385 this->myMaster_ = 0;385 this->myMaster_ = nullptr; 386 386 this->state_ = FREE; 387 387 } … … 411 411 412 412 //has it an FormationController? 413 Controller* controller = 0;413 Controller* controller = nullptr; 414 414 415 415 if (it->getController()) … … 458 458 { 459 459 this->state_ = MASTER; 460 this->myMaster_ = 0;460 this->myMaster_ = nullptr; 461 461 } 462 462 } … … 518 518 newMaster->state_ = MASTER; 519 519 newMaster->slaves_ = this->slaves_; 520 newMaster->myMaster_ = 0;520 newMaster->myMaster_ = nullptr; 521 521 522 522 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) … … 547 547 newMaster->state_ = MASTER; 548 548 newMaster->slaves_ = this->slaves_; 549 newMaster->myMaster_ = 0;549 newMaster->myMaster_ = nullptr; 550 550 551 551 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) … … 572 572 { 573 573 (*it)->state_ = FREE; 574 (*it)->myMaster_ = 0;574 (*it)->myMaster_ = nullptr; 575 575 } 576 576 this->slaves_.clear(); … … 629 629 630 630 //search new Master, then take lead 631 if (this->state_==FREE && this->myMaster_== 0)631 if (this->state_==FREE && this->myMaster_==nullptr) 632 632 { 633 633 searchNewMaster(); … … 654 654 (*it)->myMaster_=this; 655 655 } 656 this->myMaster_= 0;656 this->myMaster_=nullptr; 657 657 this->state_=MASTER; 658 658 } … … 779 779 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 780 780 { 781 Controller* controller = 0;781 Controller* controller = nullptr; 782 782 783 783 if (it->getController()) … … 943 943 void FormationController::forgetTarget() 944 944 { 945 this->target_ = 0;945 this->target_ = nullptr; 946 946 this->bShooting_ = false; 947 947 } … … 963 963 int team2 = entity2->getTeam(); 964 964 965 Controller* controller = 0;965 Controller* controller = nullptr; 966 966 if (entity1->getController()) 967 967 controller = entity1->getController(); … … 996 996 } 997 997 998 TeamBaseMatchBase* base = 0;998 TeamBaseMatchBase* base = nullptr; 999 999 base = orxonox_cast<TeamBaseMatchBase*>(entity1); 1000 1000 if (base) … … 1030 1030 } 1031 1031 1032 DroneController* droneController = 0;1032 DroneController* droneController = nullptr; 1033 1033 droneController = orxonox_cast<DroneController*>(entity1->getController()); 1034 1034 if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity2) -
code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc
r10765 r10768 65 65 RegisterUnloadableClass(HumanController); 66 66 67 HumanController* HumanController::localController_s = 0;67 HumanController* HumanController::localController_s = nullptr; 68 68 69 69 HumanController::HumanController(Context* context) : FormationController(context) … … 81 81 HumanController::localController_s->removeFromFormation(); 82 82 } 83 HumanController::localController_s = 0;83 HumanController::localController_s = nullptr; 84 84 } 85 85 -
code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc
r10765 r10768 58 58 RegisterUnloadableClass(NewHumanController); 59 59 60 NewHumanController* NewHumanController::localController_s = 0;60 NewHumanController* NewHumanController::localController_s = nullptr; 61 61 62 62 NewHumanController::NewHumanController(Context* context) … … 445 445 pawn->setAimPosition( mouseRay.getOrigin() + mouseRay.getDirection() * 3000 ); 446 446 447 if( this->getControllableEntity() && this->getControllableEntity()->getTarget() != 0)448 this->getControllableEntity()->setTarget( 0);447 if( this->getControllableEntity() && this->getControllableEntity()->getTarget() != nullptr ) 448 this->getControllableEntity()->setTarget( nullptr ); 449 449 450 450 //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 2000); -
code/branches/cpp11_v2/src/orxonox/controllers/WaypointPatrolController.cc
r9716 r10768 101 101 102 102 if (shortestsqdistance > (this->alertnessradius_ * this->alertnessradius_)) 103 this->target_ = 0;103 this->target_ = nullptr; 104 104 } 105 105 } -
code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
r10765 r10768 65 65 GSLevel::GSLevel(const GameStateInfo& info) 66 66 : GameState(info) 67 , gameInputState_( 0)68 , guiMouseOnlyInputState_( 0)69 , guiKeysOnlyInputState_( 0)70 , startFile_( 0)67 , gameInputState_(nullptr) 68 , guiMouseOnlyInputState_(nullptr) 69 , guiKeysOnlyInputState_(nullptr) 70 , startFile_(nullptr) 71 71 , bShowIngameGUI_(false) 72 72 { … … 143 143 #endif 144 144 145 gameInputState_->setHandler( 0);146 guiMouseOnlyInputState_->setHandler( 0);147 guiKeysOnlyInputState_->setHandler( 0);145 gameInputState_->setHandler(nullptr); 146 guiMouseOnlyInputState_->setHandler(nullptr); 147 guiKeysOnlyInputState_->setHandler(nullptr); 148 148 InputManager::getInstance().destroyState("game"); 149 149 InputManager::getInstance().destroyState("guiKeysOnly"); -
code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc
r10765 r10768 132 132 InputManager::getInstance().leaveState("MainMenuHackery"); 133 133 134 GraphicsManager::getInstance().setCamera( 0);134 GraphicsManager::getInstance().setCamera(nullptr); 135 135 GUIManager::getInstance().setBackgroundImage(""); 136 136 GUIManager::hideGUI("MainMenu"); … … 140 140 ModifyConsoleCommand(__CC_startClient_name ).deactivate(); 141 141 ModifyConsoleCommand(__CC_startDedicated_name ).deactivate(); 142 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject( 0);142 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(nullptr); 143 143 } 144 144 -
code/branches/cpp11_v2/src/orxonox/gamestates/GSRoot.cc
r10624 r10768 98 98 void GSRoot::deactivate() 99 99 { 100 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject( 0);101 ModifyConsoleCommand(__CC_getTimeFactor_name).setObject( 0);102 ModifyConsoleCommand(__CC_setPause_name).setObject( 0);103 ModifyConsoleCommand(__CC_pause_name).setObject( 0);100 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(nullptr); 101 ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(nullptr); 102 ModifyConsoleCommand(__CC_setPause_name).setObject(nullptr); 103 ModifyConsoleCommand(__CC_pause_name).setObject(nullptr); 104 104 } 105 105 -
code/branches/cpp11_v2/src/orxonox/gamestates/GSServer.cc
r10624 r10768 44 44 GSServer::GSServer(const GameStateInfo& info) 45 45 : GameState(info) 46 , server_( 0)46 , server_(nullptr) 47 47 { 48 48 } -
code/branches/cpp11_v2/src/orxonox/gametypes/Asteroids.h
r9667 r10768 50 50 51 51 protected: 52 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);52 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 53 53 54 54 private: -
code/branches/cpp11_v2/src/orxonox/gametypes/Deathmatch.h
r9667 r10768 47 47 virtual bool playerChangedName(PlayerInfo* player); 48 48 49 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);49 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 50 50 virtual void playerScored(PlayerInfo* player, int score = 1); 51 51 }; -
code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc
r10624 r10768 685 685 } 686 686 687 return 0;687 return nullptr; 688 688 } 689 689 -
code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.h
r10624 r10768 64 64 bool tutorial; //goal: new players receive messages how the new gametype works - later it can be switched off. 65 65 66 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //ok - score function and management of parties67 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //ok - simple66 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); //ok - score function and management of parties 67 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); //ok - simple 68 68 virtual void start(); 69 69 virtual void end(); //Wie geht das mit der Punkteausgabe aendern? Z.B: Persoenliche Nachricht? -
code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc
r10765 r10768 66 66 67 67 this->defaultControllableEntity_ = Class(Spectator); 68 this->scoreboard_ = 0;68 this->scoreboard_ = nullptr; 69 69 70 70 this->bAutoStart_ = false; … … 361 361 return fallbackSpawnPoint; 362 362 } 363 return 0;363 return nullptr; 364 364 } 365 365 -
code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.h
r10624 r10768 96 96 virtual void playerScored(PlayerInfo* player, int score = 1); 97 97 98 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);99 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);100 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);101 102 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);98 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = nullptr); 99 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); 100 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 101 102 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 103 103 virtual void pawnPreSpawn(Pawn* pawn); 104 104 virtual void pawnPostSpawn(Pawn* pawn); -
code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.h
r9667 r10768 69 69 void setConfigValues(); //!< Makes values configurable. 70 70 71 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponent, his punishment countdown will be resetted.72 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each players lives.71 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); //!< If a player shoot's an opponent, his punishment countdown will be resetted. 72 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); //!< Manages each players lives. 73 73 74 74 virtual void end(); //!< Sends an end message. -
code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.h
r9667 r10768 77 77 virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables. 78 78 79 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each player's lost lives.80 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponent, his punishment countdown will be resetted.79 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); //!< Manages each player's lost lives. 80 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); //!< If a player shoot's an opponent, his punishment countdown will be resetted. 81 81 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); //!< Resets punishment time and respawn delay. 82 82 void tick (float dt); //!< used to end the game -
code/branches/cpp11_v2/src/orxonox/gametypes/Mission.h
r9729 r10768 58 58 59 59 protected: 60 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);60 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 61 61 bool missionAccomplished_; //<! indicates if player successfully finsihed the mission; 62 62 int lives_; //<! amount of player's lives <-> nr. of retries -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc
r9667 r10768 264 264 return (*it); 265 265 } 266 return 0;266 return nullptr; 267 267 } 268 268 -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.h
r9667 r10768 44 44 virtual ~TeamBaseMatch() {} 45 45 46 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);46 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 47 47 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator); 48 48 -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.h
r9941 r10768 48 48 virtual bool playerChangedName(PlayerInfo* player); 49 49 50 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);50 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 51 51 virtual void playerScored(PlayerInfo* player, int score = 1); 52 52 protected: -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc
r10765 r10768 277 277 } 278 278 279 return 0;279 return nullptr; 280 280 } 281 281 … … 340 340 ControllableEntity* entity = orxonox_cast<ControllableEntity*>(pawn); 341 341 342 Controller* controller = 0;342 Controller* controller = nullptr; 343 343 if (entity->getController()) 344 344 controller = entity->getController(); -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.h
r9941 r10768 51 51 virtual void spawnDeadPlayersIfRequested(); //!< Prevents players to respawn. 52 52 53 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);54 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);55 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);53 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = nullptr); 54 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); 55 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 56 56 57 57 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); -
code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc
r9941 r10768 48 48 this->gameTime_ = 180; 49 49 this->teams_ = 2; 50 this->destroyer_ = 0;50 this->destroyer_ = nullptr; 51 51 this->destroyer_.setCallback(createFunctor(&UnderAttack::killedDestroyer, this)); 52 52 this->gameEnded_ = false; … … 202 202 void UnderAttack::setTransporterHealth() 203 203 { 204 if (this->destroyer_ != 0)204 if (this->destroyer_ != nullptr) 205 205 { 206 206 //Calculation: Each attacker deals about 3500 damage. A human attacker deals 1500 damage additionally. -
code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.h
r9941 r10768 48 48 { return this->destroyer_; } 49 49 50 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);51 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);52 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);50 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = nullptr); 51 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); 52 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 53 53 virtual void playerEntered(PlayerInfo* player); 54 54 -
code/branches/cpp11_v2/src/orxonox/graphics/Backlight.cc
r9667 r10768 51 51 RegisterObject(Backlight); 52 52 53 this->ribbonTrail_ = 0;54 this->ribbonTrailNode_ = 0;53 this->ribbonTrail_ = nullptr; 54 this->ribbonTrailNode_ = nullptr; 55 55 56 56 this->width_ = 0; -
code/branches/cpp11_v2/src/orxonox/graphics/Light.cc
r9667 r10768 53 53 RegisterObject(Light); 54 54 55 this->light_ = 0;55 this->light_ = nullptr; 56 56 this->diffuse_ = ColourValue::White; 57 57 this->specular_ = ColourValue::White; -
code/branches/cpp11_v2/src/orxonox/graphics/Model.cc
r10765 r10768 134 134 Level* level = this->getLevel(); 135 135 136 assert( level != 0);136 assert( level != nullptr ); 137 137 138 138 MeshLodInformation* lodInfo = level->getLodInfo(this->meshSrc_); -
code/branches/cpp11_v2/src/orxonox/graphics/ParticleEmitter.cc
r9950 r10768 52 52 ThrowException(AbortLoading, "Can't create ParticleEmitter, no scene or no scene manager given."); 53 53 54 this->particles_ = 0;54 this->particles_ = nullptr; 55 55 this->LOD_ = LODParticle::Normal; 56 56 … … 102 102 { 103 103 delete this->particles_; 104 this->particles_ = 0;104 this->particles_ = nullptr; 105 105 } 106 106 -
code/branches/cpp11_v2/src/orxonox/infos/HumanPlayer.cc
r10624 r10768 53 53 this->defaultController_ = Class(NewHumanController); 54 54 55 this->humanHud_ = 0;56 this->gametypeHud_ = 0;55 this->humanHud_ = nullptr; 56 this->gametypeHud_ = nullptr; 57 57 58 58 this->setConfigValues(); … … 178 178 { 179 179 this->humanHud_->destroy(); 180 this->humanHud_ = 0;180 this->humanHud_ = nullptr; 181 181 } 182 182 … … 194 194 { 195 195 this->gametypeHud_->destroy(); 196 this->gametypeHud_ = 0;196 this->gametypeHud_ = nullptr; 197 197 } 198 198 -
code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc
r10765 r10768 51 51 this->bReadyToSpawn_ = false; 52 52 this->bSetUnreadyAfterSpawn_ = true; 53 this->controller_ = 0;54 this->controllableEntity_ = 0;53 this->controller_ = nullptr; 54 this->controllableEntity_ = nullptr; 55 55 this->controllableEntityID_ = OBJECTID_UNKNOWN; 56 56 57 this->gtinfo_ = 0;57 this->gtinfo_ = nullptr; 58 58 this->gtinfoID_ = OBJECTID_UNKNOWN; 59 59 this->updateGametypeInfo(this->getGametype()); … … 72 72 { 73 73 this->controller_->destroy(); 74 this->controller_ = 0;74 this->controller_ = nullptr; 75 75 } 76 76 … … 126 126 void PlayerInfo::updateGametypeInfo(Gametype* gametype) 127 127 { 128 this->gtinfo_ = 0;128 this->gtinfo_ = nullptr; 129 129 this->gtinfoID_ = OBJECTID_UNKNOWN; 130 130 … … 141 141 { 142 142 this->controller_->destroy(); 143 this->controller_ = 0;143 this->controller_ = nullptr; 144 144 } 145 145 this->controller_ = this->defaultController_.fabricate(this->getContext()); … … 214 214 return; 215 215 216 this->controllableEntity_->setController( 0);217 this->controllableEntity_ = 0;216 this->controllableEntity_->setController(nullptr); 217 this->controllableEntity_ = nullptr; 218 218 this->controllableEntityID_ = OBJECTID_UNKNOWN; 219 219 220 220 if (this->controller_) 221 this->controller_->setControllableEntity( 0);221 this->controller_->setControllableEntity(nullptr); 222 222 223 223 if ( GameMode::isMaster() ) … … 242 242 tmp->setActive(false); 243 243 //this->controllableEntity_->getController()->setControllableEntity(nullptr); 244 this->controllableEntity_->setController( 0);244 this->controllableEntity_->setController(nullptr); 245 245 } 246 246 … … 253 253 return; 254 254 255 this->controllableEntity_->setController( 0);255 this->controllableEntity_->setController(nullptr); 256 256 if(this->isHumanPlayer()) // TODO: Multiplayer? 257 257 this->controllableEntity_->destroyHud(); // HACK-ish -
code/branches/cpp11_v2/src/orxonox/interfaces/RadarViewable.h
r10624 r10768 66 66 if (name == "HIDDEN") 67 67 { 68 this->bVisibility_ = 0;68 this->bVisibility_ = false; 69 69 this->settingsChanged(); 70 70 } -
code/branches/cpp11_v2/src/orxonox/items/Engine.cc
r10765 r10768 50 50 RegisterObject(Engine); 51 51 52 this->ship_ = 0;52 this->ship_ = nullptr; 53 53 this->shipID_ = OBJECTID_UNKNOWN; 54 54 this->relativePosition_ = Vector3::ZERO; … … 136 136 void Engine::networkcallback_shipID() 137 137 { 138 this->ship_ = 0;138 this->ship_ = nullptr; 139 139 140 140 if (this->shipID_ != OBJECTID_UNKNOWN) -
code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
r10765 r10768 67 67 else 68 68 { 69 this->defEngineSndBoost_ = 0;70 this->defEngineSndNormal_ = 0;71 this->lua_ = 0;69 this->defEngineSndBoost_ = nullptr; 70 this->defEngineSndNormal_ = nullptr; 71 this->lua_ = nullptr; 72 72 } 73 73 this->state_ = 0; -
code/branches/cpp11_v2/src/orxonox/overlays/InGameConsole.cc
r10624 r10768 75 75 : shell_(new Shell("InGameConsole", true)) 76 76 , bShowCursor_(false) 77 , consoleOverlay_( 0)78 , consoleOverlayContainer_( 0)79 , consoleOverlayNoise_( 0)80 , consoleOverlayCursor_( 0)81 , consoleOverlayBorder_( 0)82 , consoleOverlayTextAreas_( 0)83 , inputState_( 0)77 , consoleOverlay_(nullptr) 78 , consoleOverlayContainer_(nullptr) 79 , consoleOverlayNoise_(nullptr) 80 , consoleOverlayCursor_(nullptr) 81 , consoleOverlayBorder_(nullptr) 82 , consoleOverlayTextAreas_(nullptr) 83 , inputState_(nullptr) 84 84 { 85 85 RegisterObject(InGameConsole); … … 130 130 if (this->consoleOverlayTextAreas_[i]) 131 131 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayTextAreas_[i]); 132 this->consoleOverlayTextAreas_[i] = 0;132 this->consoleOverlayTextAreas_[i] = nullptr; 133 133 } 134 134 … … 140 140 { 141 141 delete[] this->consoleOverlayTextAreas_; 142 this->consoleOverlayTextAreas_ = 0;142 this->consoleOverlayTextAreas_ = nullptr; 143 143 } 144 144 … … 175 175 else 176 176 { 177 inputState_->setMouseHandler( 0);178 inputState_->setJoyStickHandler( 0);177 inputState_->setMouseHandler(nullptr); 178 inputState_->setJoyStickHandler(nullptr); 179 179 } 180 180 } -
code/branches/cpp11_v2/src/orxonox/overlays/OrxonoxOverlay.cc
r10624 r10768 70 70 RegisterObject(OrxonoxOverlay); 71 71 72 this->owner_ = 0;73 this->group_ = 0;72 this->owner_ = nullptr; 73 this->group_ = nullptr; 74 74 75 75 if (!GameMode::showsGraphics()) -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10624 r10768 54 54 RegisterObject(OverlayGroup); 55 55 56 this->owner_ = 0;56 this->owner_ = nullptr; 57 57 58 58 setScale(Vector2(1.0, 1.0)); … … 139 139 } 140 140 else 141 return 0;141 return nullptr; 142 142 } 143 143 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc
r9667 r10768 65 65 // For separated magazines we definitively need a given user 66 66 if (!user) 67 return 0;67 return nullptr; 68 68 69 69 // Use the map to get the magazine assigned to the given user … … 79 79 } 80 80 81 return 0;81 return nullptr; 82 82 } 83 83 … … 236 236 // If we don't use separate magazines, set user to 0 237 237 if (!this->bUseSeparateMagazines_) 238 user = 0;238 user = nullptr; 239 239 240 240 // Remove the current magazine for the given user … … 442 442 // If we don't use separate magazines, set user to 0 443 443 if (!this->bUseSeparateMagazines_) 444 user = 0;444 user = nullptr; 445 445 446 446 // Remove the current magazine for the given user -
code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc
r10650 r10768 45 45 RegisterObject(Weapon); 46 46 47 this->weaponPack_ = 0;48 this->weaponSlot_ = 0;47 this->weaponPack_ = nullptr; 48 this->weaponSlot_ = nullptr; 49 49 this->bReloading_ = false; 50 50 this->reloadingWeaponmode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; … … 92 92 ++i; 93 93 } 94 return 0;94 return nullptr; 95 95 } 96 96 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponMode.cc
r10650 r10768 51 51 RegisterObject(WeaponMode); 52 52 53 this->weapon_ = 0;53 this->weapon_ = nullptr; 54 54 this->mode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; 55 55 56 this->munition_ = 0;56 this->munition_ = nullptr; 57 57 this->initialMunition_ = 0; 58 58 this->initialMagazines_ = 0; … … 232 232 } 233 233 else 234 this->munition_ = 0;234 this->munition_ = nullptr; 235 235 } 236 236 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc
r10650 r10768 44 44 RegisterObject(WeaponPack); 45 45 46 this->weaponSystem_ = 0;46 this->weaponSystem_ = nullptr; 47 47 } 48 48 … … 107 107 assert(it != this->weapons_.end()); 108 108 this->weapons_.erase(it); 109 weapon->setWeaponPack( 0);109 weapon->setWeaponPack(nullptr); 110 110 } 111 111 … … 121 121 } 122 122 123 return 0;123 return nullptr; 124 124 } 125 125 … … 139 139 ++i; 140 140 } 141 return 0;141 return nullptr; 142 142 } 143 143 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc
r10650 r10768 43 43 RegisterObject(WeaponSet); 44 44 45 this->weaponSystem_ = 0;45 this->weaponSystem_ = nullptr; 46 46 this->desiredFiremode_ = WeaponSystem::FIRE_MODE_UNASSIGNED; 47 47 } -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSlot.cc
r10648 r10768 43 43 RegisterObject(WeaponSlot); 44 44 45 this->weaponSystem_ = 0;46 this->weapon_ = 0;45 this->weaponSystem_ = nullptr; 46 this->weapon_ = nullptr; 47 47 48 48 this->setSyncMode(ObjectDirection::None); … … 88 88 if (this->weapon_) 89 89 { 90 this->weapon_->setWeaponSlot( 0);91 this->weapon_ = 0;90 this->weapon_->setWeaponSlot(nullptr); 91 this->weapon_ = nullptr; 92 92 } 93 93 } -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSlot.h
r10650 r10768 74 74 */ 75 75 inline bool isOccupied() const 76 { return (this->weapon_ != 0); }76 { return (this->weapon_ != nullptr); } 77 77 78 78 inline void setWeaponSystem(WeaponSystem * weaponSystem) -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc
r10650 r10768 52 52 RegisterObject(WeaponSystem); 53 53 54 this->pawn_ = 0;54 this->pawn_ = nullptr; 55 55 } 56 56 … … 60 60 { 61 61 if (this->pawn_) 62 this->pawn_->setWeaponSystem( 0);62 this->pawn_->setWeaponSystem(nullptr); 63 63 64 64 while (!this->weaponSets_.empty()) … … 112 112 return (*it); 113 113 } 114 return 0;114 return nullptr; 115 115 } 116 116 … … 159 159 return it->second; 160 160 } 161 return 0;161 return nullptr; 162 162 } 163 163 … … 213 213 // Remove all weapons from their WeaponSlot 214 214 unsigned int i = 0; 215 Weapon* weapon = 0;215 Weapon* weapon = nullptr; 216 216 while ((weapon = wPack->getWeapon(i++))) 217 217 if (weapon->getWeaponSlot()) … … 237 237 return (*it); 238 238 } 239 return 0;239 return nullptr; 240 240 } 241 241 … … 303 303 { 304 304 if (!identifier || !identifier->getIdentifier()) 305 return 0;305 return nullptr; 306 306 307 307 std::map<Identifier *, Munition *>::iterator it = this->munitions_.find(identifier->getIdentifier()); … … 318 318 else 319 319 { 320 return 0;320 return nullptr; 321 321 } 322 322 } -
code/branches/cpp11_v2/src/orxonox/worldentities/BigExplosion.cc
r9952 r10768 204 204 void BigExplosion::initZero() 205 205 { 206 this->debrisFire1_ = 0;207 this->debrisFire2_ = 0;208 this->debrisFire3_ = 0;209 this->debrisFire4_ = 0;210 211 this->debrisSmoke1_ = 0;212 this->debrisSmoke2_ = 0;213 this->debrisSmoke3_ = 0;214 this->debrisSmoke4_ = 0;215 216 this->explosionSmoke_= 0;217 this->explosionFire_= 0;206 this->debrisFire1_ = nullptr; 207 this->debrisFire2_ = nullptr; 208 this->debrisFire3_ = nullptr; 209 this->debrisFire4_ = nullptr; 210 211 this->debrisSmoke1_ = nullptr; 212 this->debrisSmoke2_ = nullptr; 213 this->debrisSmoke3_ = nullptr; 214 this->debrisSmoke4_ = nullptr; 215 216 this->explosionSmoke_=nullptr; 217 this->explosionFire_=nullptr; 218 218 } 219 219 -
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
r10765 r10768 61 61 this->server_overwrite_ = 0; 62 62 this->client_overwrite_ = 0; 63 this->player_ = 0;63 this->player_ = nullptr; 64 64 this->formerPlayer_ = nullptr; 65 65 this->playerID_ = OBJECTID_UNKNOWN; 66 this->hud_ = 0;67 this->camera_ = 0;68 this->xmlcontroller_ = 0;69 //this->controller_ = 0;70 this->reverseCamera_ = 0;66 this->hud_ = nullptr; 67 this->camera_ = nullptr; 68 this->xmlcontroller_ = nullptr; 69 //this->controller_ = nullptr; 70 this->reverseCamera_ = nullptr; 71 71 this->bDestroyWhenPlayerLeft_ = false; 72 72 this->cameraPositionRootNode_ = this->node_->createChildSceneNode(); 73 this->currentCameraPosition_ = 0;73 this->currentCameraPosition_ = nullptr; 74 74 this->bMouseLook_ = false; 75 75 this->mouseLookSpeed_ = 200; … … 171 171 ++i; 172 172 } 173 return 0;173 return nullptr; 174 174 } 175 175 … … 241 241 { 242 242 this->camera_->attachToNode(this->cameraPositionRootNode_); 243 this->currentCameraPosition_ = 0;243 this->currentCameraPosition_ = nullptr; 244 244 } 245 245 … … 321 321 if ( !GameMode::isMaster() ) 322 322 { 323 if ( target != 0)323 if ( target != nullptr ) 324 324 { 325 325 callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, target->getObjectID() ); … … 372 372 this->stopLocalHumanControl(); 373 373 374 this->player_ = 0;374 this->player_ = nullptr; 375 375 this->playerID_ = OBJECTID_UNKNOWN; 376 376 this->bHasLocalController_ = false; … … 411 411 { 412 412 this->camera_->attachToNode(this->cameraPositionRootNode_); 413 this->currentCameraPosition_ = 0;413 this->currentCameraPosition_ = nullptr; 414 414 } 415 415 } … … 447 447 this->camera_->detachFromParent(); 448 448 this->camera_->destroy(); 449 this->camera_ = 0;449 this->camera_ = nullptr; 450 450 } 451 451 … … 453 453 { 454 454 this->hud_->destroy(); 455 this->hud_ = 0;455 this->hud_ = nullptr; 456 456 } 457 457 } -
code/branches/cpp11_v2/src/orxonox/worldentities/Drone.cc
r9667 r10768 43 43 RegisterObject(Drone); 44 44 45 this->myController_ = 0;45 this->myController_ = nullptr; 46 46 47 47 this->localLinearAcceleration_.setValue(0, 0, 0); -
code/branches/cpp11_v2/src/orxonox/worldentities/ExplosionChunk.cc
r9667 r10768 62 62 { 63 63 orxout(internal_error) << "Couldn't load particle effect in ExplosionChunk: " << ex.what() << endl; 64 this->fire_ = 0;65 this->smoke_ = 0;64 this->fire_ = nullptr; 65 this->smoke_ = nullptr; 66 66 } 67 67 } 68 68 else 69 69 { 70 this->fire_ = 0;71 this->smoke_ = 0;70 this->fire_ = nullptr; 71 this->smoke_ = nullptr; 72 72 } 73 73 -
code/branches/cpp11_v2/src/orxonox/worldentities/MovableEntity.cc
r10216 r10768 50 50 this->overwrite_orientation_ = Quaternion::IDENTITY; 51 51 52 this->continuousResynchroTimer_ = 0;52 this->continuousResynchroTimer_ = nullptr; 53 53 54 54 this->setPriority(Priority::Low); … … 80 80 { 81 81 float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length(); 82 victim->hit( 0, contactPoint, ownCollisionShape, damage);82 victim->hit(nullptr, contactPoint, ownCollisionShape, damage); 83 83 } 84 84 } -
code/branches/cpp11_v2/src/orxonox/worldentities/SpawnPoint.cc
r9667 r10768 43 43 RegisterObject(SpawnPoint); 44 44 45 this->template_ = 0;45 this->template_ = nullptr; 46 46 47 47 if (this->getGametype()) -
code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
r10765 r10768 77 77 this->node_ = this->getScene()->getRootSceneNode()->createChildSceneNode(); 78 78 79 this->parent_ = 0;79 this->parent_ = nullptr; 80 80 this->parentID_ = OBJECTID_UNKNOWN; 81 81 this->bDeleteWithParent_ = true; … … 90 90 91 91 // Default behaviour does not include physics 92 this->physicalBody_ = 0;92 this->physicalBody_ = nullptr; 93 93 this->bPhysicsActive_ = false; 94 94 this->bPhysicsActiveSynchronised_ = false; … … 498 498 void WorldEntity::notifyDetached() 499 499 { 500 this->parent_ = 0;500 this->parent_ = nullptr; 501 501 this->parentID_ = OBJECTID_UNKNOWN; 502 502 … … 525 525 ++i; 526 526 } 527 return 0;527 return nullptr; 528 528 } 529 529 … … 856 856 deactivatePhysics(); 857 857 delete this->physicalBody_; 858 this->physicalBody_ = 0;858 this->physicalBody_ = nullptr; 859 859 this->collisionType_ = None; 860 860 this->collisionTypeSynchronised_ = None; -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
r10765 r10768 53 53 RegisterClass(ModularSpaceShip); 54 54 55 std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = 0;55 std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = nullptr; 56 56 57 57 ModularSpaceShip::ModularSpaceShip(Context* context) : SpaceShip(context) -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.cc
r10650 r10768 76 76 this->reloadWaitCountdown_ = 0; 77 77 78 this->lastHitOriginator_ = 0;78 this->lastHitOriginator_ = nullptr; 79 79 80 80 // set damage multiplier to default value 1, meaning nominal damage … … 91 91 } 92 92 else 93 this->weaponSystem_ = 0;93 this->weaponSystem_ = nullptr; 94 94 95 95 this->setRadarObjectColour(ColourValue::Red); … … 109 109 else 110 110 { 111 this->explosionSound_ = 0;111 this->explosionSound_ = nullptr; 112 112 } 113 113 } … … 345 345 { 346 346 // delete the AIController // <-- TODO: delete? nothing is deleted here... should we delete the controller? 347 slave->setControllableEntity( 0);347 slave->setControllableEntity(nullptr); 348 348 349 349 // set a new master within the formation … … 509 509 return this->weaponSystem_->getWeaponSlot(index); 510 510 else 511 return 0;511 return nullptr; 512 512 } 513 513 … … 523 523 return this->weaponSystem_->getWeaponSet(index); 524 524 else 525 return 0;525 return nullptr; 526 526 } 527 527 … … 551 551 return this->weaponSystem_->getWeaponPack(index); 552 552 else 553 return 0;553 return nullptr; 554 554 } 555 555 … … 594 594 return it->getController(); 595 595 } 596 return 0;596 return nullptr; 597 597 } 598 598 -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h
r10765 r10768 207 207 virtual void spawneffect(); 208 208 209 //virtual void damage(float damage, Pawn* originator = 0);209 //virtual void damage(float damage, Pawn* originator = nullptr); 210 210 virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr); 211 211 -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc
r10765 r10768 494 494 Camera* camera = this->getCamera(); 495 495 //Shaking Camera effect 496 if (camera != 0)496 if (camera != nullptr) 497 497 camera->setOrientation(Vector3::UNIT_X, angle); 498 498 … … 526 526 { 527 527 Camera *camera = this->getCamera(); 528 if (camera == 0)528 if (camera == nullptr) 529 529 { 530 530 orxout(internal_warning) << "Failed to reset camera!" << endl; -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Spectator.cc
r10624 r10768 58 58 this->localVelocity_ = Vector3::ZERO; 59 59 this->setHudTemplate("spectatorhud"); 60 this->greetingFlare_ = 0;60 this->greetingFlare_ = nullptr; 61 61 62 62 this->setDestroyWhenPlayerLeft(true); -
code/branches/cpp11_v2/test/core/command/CommandTest.cc
r10765 r10768 129 129 ModifyConsoleCommand("test").popObject(); 130 130 else if (a == 1) 131 ModifyConsoleCommand("test").setFunction(FunctorPtr( 0));131 ModifyConsoleCommand("test").setFunction(FunctorPtr(nullptr)); 132 132 else if (a == -1) 133 133 ModifyConsoleCommand("test").popFunction(); -
code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc
r10765 r10768 112 112 { 113 113 EXPECT_TRUE(strongPtr == nullptr); 114 EXPECT_TRUE(strongPtr == 0);114 EXPECT_TRUE(strongPtr == nullptr); 115 115 EXPECT_TRUE(!strongPtr); 116 116 EXPECT_FALSE(strongPtr != nullptr); 117 EXPECT_FALSE(strongPtr != 0);117 EXPECT_FALSE(strongPtr != nullptr); 118 118 EXPECT_FALSE(strongPtr); 119 119 } … … 135 135 } 136 136 { 137 StrongPtr<DestroyableTest> strongPtr = 0;137 StrongPtr<DestroyableTest> strongPtr = nullptr; 138 138 isNull(strongPtr); 139 139 } 140 140 { 141 141 StrongPtr<DestroyableTest> strongPtr; 142 strongPtr = 0;142 strongPtr = nullptr; 143 143 isNull(strongPtr); 144 144 } … … 151 151 StrongPtr<DestroyableTest> strongPtr = test; 152 152 EXPECT_FALSE(strongPtr == nullptr); 153 EXPECT_FALSE(strongPtr == 0);153 EXPECT_FALSE(strongPtr == nullptr); 154 154 EXPECT_FALSE(!strongPtr); 155 155 EXPECT_TRUE(strongPtr != nullptr); 156 EXPECT_TRUE(strongPtr != 0);156 EXPECT_TRUE(strongPtr != nullptr); 157 157 EXPECT_TRUE(strongPtr); 158 158 test->destroy(); -
code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc
r10765 r10768 67 67 { 68 68 EXPECT_TRUE(weakPtr == nullptr); 69 EXPECT_TRUE(weakPtr == 0);69 EXPECT_TRUE(weakPtr == nullptr); 70 70 EXPECT_TRUE(!weakPtr); 71 71 EXPECT_FALSE(weakPtr != nullptr); 72 EXPECT_FALSE(weakPtr != 0);72 EXPECT_FALSE(weakPtr != nullptr); 73 73 EXPECT_FALSE(weakPtr); 74 74 } … … 90 90 } 91 91 { 92 WeakPtr<DestroyableTest> weakPtr = 0;92 WeakPtr<DestroyableTest> weakPtr = nullptr; 93 93 isNull(weakPtr); 94 94 } 95 95 { 96 96 WeakPtr<DestroyableTest> weakPtr; 97 weakPtr = 0;97 weakPtr = nullptr; 98 98 isNull(weakPtr); 99 99 } … … 105 105 WeakPtr<DestroyableTest> weakPtr = test; 106 106 EXPECT_FALSE(weakPtr == nullptr); 107 EXPECT_FALSE(weakPtr == 0);107 EXPECT_FALSE(weakPtr == nullptr); 108 108 EXPECT_FALSE(!weakPtr); 109 109 EXPECT_TRUE(weakPtr != nullptr); 110 EXPECT_TRUE(weakPtr != 0);110 EXPECT_TRUE(weakPtr != nullptr); 111 111 EXPECT_TRUE(weakPtr); 112 112 test->destroy(); -
code/branches/cpp11_v2/test/util/SharedPtrTest.cc
r10765 r10768 41 41 { 42 42 SharedPtr<TestClass> test; 43 EXPECT_EQ( 0, test.get());43 EXPECT_EQ(nullptr, test.get()); 44 44 } 45 45 … … 91 91 92 92 SharedPtr<TestClass> test; 93 EXPECT_EQ( 0, test.get());93 EXPECT_EQ(nullptr, test.get()); 94 94 95 95 test = other; … … 105 105 106 106 SharedPtr<TestClass> test; 107 EXPECT_EQ( 0, test.get());107 EXPECT_EQ(nullptr, test.get()); 108 108 109 109 test = other; … … 138 138 { 139 139 SharedPtr<TestClass> test; 140 EXPECT_EQ( 0, test.get());140 EXPECT_EQ(nullptr, test.get()); 141 141 EXPECT_FALSE(test); 142 142 -
code/branches/cpp11_v2/test/util/SmallObjectAllocatorTest.cc
r9114 r10768 47 47 // create an integer 48 48 size_t* pointer = this->create(5); 49 ASSERT_NE((void*) 0, pointer);49 ASSERT_NE((void*)nullptr, pointer); 50 50 EXPECT_EQ(5u, *pointer); 51 51 } … … 55 55 // create an integer 56 56 size_t* pointer = this->create(5); 57 ASSERT_NE((void*) 0, pointer);57 ASSERT_NE((void*)nullptr, pointer); 58 58 EXPECT_EQ(5u, *pointer); 59 59 … … 228 228 // create an object 229 229 SmallObject* pointer = this->create(5); 230 ASSERT_NE((void*) 0, pointer);230 ASSERT_NE((void*)nullptr, pointer); 231 231 EXPECT_EQ(5u, pointer->getValue()); 232 232 EXPECT_EQ(5u, SmallObject::total_s); … … 239 239 // create an object 240 240 SmallObject* pointer = this->create(5); 241 ASSERT_NE((void*) 0, pointer);241 ASSERT_NE((void*)nullptr, pointer); 242 242 EXPECT_EQ(5u, pointer->getValue()); 243 243 EXPECT_EQ(5u, SmallObject::total_s);
Note: See TracChangeset
for help on using the changeset viewer.