[Orxonox-commit 6107] r10765 - in code/branches/cpp11_v2: src/libraries/core src/libraries/core/class src/libraries/core/command src/libraries/core/config src/libraries/core/input src/libraries/core/module src/libraries/core/object src/libraries/core/singleton src/libraries/network src/libraries/network/packet src/libraries/network/synchronisable src/libraries/tools src/libraries/util src/modules/designtools src/modules/docking src/modules/dodgerace src/modules/gametypes src/modules/invader src/modules/jump src/modules/mini4dgame src/modules/notifications src/modules/objects src/modules/objects/triggers src/modules/overlays src/modules/overlays/hud src/modules/pickup src/modules/pickup/items src/modules/pong src/modules/portals src/modules/questsystem src/modules/questsystem/effects src/modules/tetris src/modules/towerdefense src/modules/weapons src/modules/weapons/projectiles src/orxonox src/orxonox/chat src/orxonox/collisionshapes src/orxonox/controllers src/orxonox/gamestates src/orxonox/gametypes src/orxonox/graphics src/orxonox/infos src/orxonox/interfaces src/orxonox/items src/orxonox/sound src/orxonox/worldentities src/orxonox/worldentities/pawns test/core/class test/core/command test/core/object test/core/singleton test/util test/util/output
landauf at orxonox.net
landauf at orxonox.net
Wed Nov 4 22:25:45 CET 2015
Author: landauf
Date: 2015-11-04 22:25:42 +0100 (Wed, 04 Nov 2015)
New Revision: 10765
Modified:
code/branches/cpp11_v2/src/libraries/core/ApplicationPaths.cc
code/branches/cpp11_v2/src/libraries/core/BaseObject.cc
code/branches/cpp11_v2/src/libraries/core/BaseObject.h
code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc
code/branches/cpp11_v2/src/libraries/core/Core.cc
code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc
code/branches/cpp11_v2/src/libraries/core/CoreIncludes.h
code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
code/branches/cpp11_v2/src/libraries/core/Game.cc
code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc
code/branches/cpp11_v2/src/libraries/core/GraphicsManager.h
code/branches/cpp11_v2/src/libraries/core/Loader.cc
code/branches/cpp11_v2/src/libraries/core/LuaState.cc
code/branches/cpp11_v2/src/libraries/core/Resource.cc
code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h
code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc
code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h
code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.h
code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.cc
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.h
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandIncludes.h
code/branches/cpp11_v2/src/libraries/core/command/Executor.cc
code/branches/cpp11_v2/src/libraries/core/command/Functor.h
code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.cc
code/branches/cpp11_v2/src/libraries/core/command/IOConsoleWindows.cc
code/branches/cpp11_v2/src/libraries/core/command/TclBind.cc
code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc
code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc
code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc
code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h
code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc
code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
code/branches/cpp11_v2/src/libraries/core/input/InputManager.h
code/branches/cpp11_v2/src/libraries/core/input/InputState.cc
code/branches/cpp11_v2/src/libraries/core/input/InputState.h
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h
code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc
code/branches/cpp11_v2/src/libraries/core/module/DynLib.cc
code/branches/cpp11_v2/src/libraries/core/module/DynLib.h
code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
code/branches/cpp11_v2/src/libraries/core/module/Plugin.cc
code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
code/branches/cpp11_v2/src/libraries/core/object/Context.cc
code/branches/cpp11_v2/src/libraries/core/object/Destroyable.cc
code/branches/cpp11_v2/src/libraries/core/object/IteratorBase.h
code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h
code/branches/cpp11_v2/src/libraries/core/object/WeakPtr.h
code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonIncludes.h
code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonWrapper.h
code/branches/cpp11_v2/src/libraries/network/ClientConnection.cc
code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc
code/branches/cpp11_v2/src/libraries/network/LANDiscoverable.cc
code/branches/cpp11_v2/src/libraries/network/LANDiscovery.cc
code/branches/cpp11_v2/src/libraries/network/MasterServer.cc
code/branches/cpp11_v2/src/libraries/network/MasterServerComm.cc
code/branches/cpp11_v2/src/libraries/network/NetworkFunctionManager.cc
code/branches/cpp11_v2/src/libraries/network/PeerList.cc
code/branches/cpp11_v2/src/libraries/network/Server.cc
code/branches/cpp11_v2/src/libraries/network/ServerConnection.cc
code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc
code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc
code/branches/cpp11_v2/src/libraries/network/packet/Packet.cc
code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
code/branches/cpp11_v2/src/libraries/tools/ResourceCollection.cc
code/branches/cpp11_v2/src/libraries/tools/Shader.cc
code/branches/cpp11_v2/src/libraries/util/Clipboard.cc
code/branches/cpp11_v2/src/libraries/util/DestructionHelper.h
code/branches/cpp11_v2/src/libraries/util/SharedPtr.h
code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc
code/branches/cpp11_v2/src/libraries/util/SignalHandler.h
code/branches/cpp11_v2/src/libraries/util/Singleton.h
code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc
code/branches/cpp11_v2/src/modules/designtools/ScreenshotManager.cc
code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.cc
code/branches/cpp11_v2/src/modules/docking/Dock.cc
code/branches/cpp11_v2/src/modules/docking/DockToShip.cc
code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc
code/branches/cpp11_v2/src/modules/docking/DockingController.cc
code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc
code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.cc
code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceCenterPoint.cc
code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceShip.cc
code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc
code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc
code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc
code/branches/cpp11_v2/src/modules/invader/Invader.cc
code/branches/cpp11_v2/src/modules/invader/InvaderCenterPoint.cc
code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc
code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc
code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc
code/branches/cpp11_v2/src/modules/jump/Jump.cc
code/branches/cpp11_v2/src/modules/jump/JumpBoots.cc
code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.cc
code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc
code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc
code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc
code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.cc
code/branches/cpp11_v2/src/modules/jump/JumpPropeller.cc
code/branches/cpp11_v2/src/modules/jump/JumpRocket.cc
code/branches/cpp11_v2/src/modules/jump/JumpScore.cc
code/branches/cpp11_v2/src/modules/jump/JumpShield.cc
code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc
code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc
code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameBoard.cc
code/branches/cpp11_v2/src/modules/notifications/NotificationDispatcher.cc
code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc
code/branches/cpp11_v2/src/modules/notifications/NotificationQueueCEGUI.cc
code/branches/cpp11_v2/src/modules/objects/Script.cc
code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc
code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc
code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc
code/branches/cpp11_v2/src/modules/objects/triggers/EventMultiTrigger.cc
code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc
code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.h
code/branches/cpp11_v2/src/modules/objects/triggers/MultiTriggerContainer.cc
code/branches/cpp11_v2/src/modules/objects/triggers/TriggerBase.cc
code/branches/cpp11_v2/src/modules/overlays/GUIOverlay.cc
code/branches/cpp11_v2/src/modules/overlays/hud/HUDEnemyHealthBar.cc
code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc
code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.cc
code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.h
code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc
code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc
code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.cc
code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.h
code/branches/cpp11_v2/src/modules/pickup/PickupSpawner.cc
code/branches/cpp11_v2/src/modules/pickup/items/DamageBoostPickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/DronePickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/HealthPickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/InvisiblePickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/ShieldPickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/ShrinkPickup.cc
code/branches/cpp11_v2/src/modules/pickup/items/SpeedPickup.cc
code/branches/cpp11_v2/src/modules/pong/Pong.cc
code/branches/cpp11_v2/src/modules/pong/PongAI.cc
code/branches/cpp11_v2/src/modules/pong/PongBall.cc
code/branches/cpp11_v2/src/modules/pong/PongCenterpoint.cc
code/branches/cpp11_v2/src/modules/pong/PongScore.cc
code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc
code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc
code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.cc
code/branches/cpp11_v2/src/modules/questsystem/Quest.cc
code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc
code/branches/cpp11_v2/src/modules/questsystem/QuestHint.cc
code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc
code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc
code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuest.cc
code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuestHint.cc
code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc
code/branches/cpp11_v2/src/modules/questsystem/effects/CompleteQuest.cc
code/branches/cpp11_v2/src/modules/questsystem/effects/FailQuest.cc
code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc
code/branches/cpp11_v2/src/modules/tetris/TetrisCenterpoint.cc
code/branches/cpp11_v2/src/modules/tetris/TetrisScore.cc
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseCenterpoint.cc
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseEnemy.cc
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseField.cc
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseTower.cc
code/branches/cpp11_v2/src/modules/weapons/IceGunFreezer.cc
code/branches/cpp11_v2/src/modules/weapons/projectiles/BasicProjectile.cc
code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc
code/branches/cpp11_v2/src/modules/weapons/projectiles/Projectile.cc
code/branches/cpp11_v2/src/orxonox/CameraManager.cc
code/branches/cpp11_v2/src/orxonox/LevelManager.cc
code/branches/cpp11_v2/src/orxonox/Scene.cc
code/branches/cpp11_v2/src/orxonox/chat/ChatInputHandler.cc
code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.h
code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc
code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
code/branches/cpp11_v2/src/orxonox/controllers/AIController.cc
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc
code/branches/cpp11_v2/src/orxonox/controllers/ControllerDirector.cc
code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc
code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc
code/branches/cpp11_v2/src/orxonox/controllers/ScriptController.cc
code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
code/branches/cpp11_v2/src/orxonox/gamestates/GSLevelMemento.h
code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc
code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc
code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc
code/branches/cpp11_v2/src/orxonox/graphics/Billboard.cc
code/branches/cpp11_v2/src/orxonox/graphics/Model.cc
code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc
code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc
code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h
code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc
code/branches/cpp11_v2/src/orxonox/items/Engine.cc
code/branches/cpp11_v2/src/orxonox/items/Engine.h
code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc
code/branches/cpp11_v2/src/orxonox/sound/AmbientSound.cc
code/branches/cpp11_v2/src/orxonox/sound/BaseSound.cc
code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc
code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc
code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc
code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.h
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc
code/branches/cpp11_v2/test/core/class/IdentifiableTest.cc
code/branches/cpp11_v2/test/core/class/IdentifierClassHierarchyTest.cc
code/branches/cpp11_v2/test/core/class/IdentifierExternalClassHierarchyTest.cc
code/branches/cpp11_v2/test/core/class/IdentifierNestedClassHierarchyTest.cc
code/branches/cpp11_v2/test/core/class/IdentifierSimpleClassHierarchyTest.cc
code/branches/cpp11_v2/test/core/class/IdentifierTest.cc
code/branches/cpp11_v2/test/core/class/OrxonoxClassTest.cc
code/branches/cpp11_v2/test/core/class/OrxonoxInterfaceTest.cc
code/branches/cpp11_v2/test/core/class/SubclassIdentifierTest.cc
code/branches/cpp11_v2/test/core/class/SuperTest.cc
code/branches/cpp11_v2/test/core/command/CommandTest.cc
code/branches/cpp11_v2/test/core/object/ClassFactoryTest.cc
code/branches/cpp11_v2/test/core/object/ContextTest.cc
code/branches/cpp11_v2/test/core/object/DestroyableTest.cc
code/branches/cpp11_v2/test/core/object/IteratorTest.cc
code/branches/cpp11_v2/test/core/object/ListableTest.cc
code/branches/cpp11_v2/test/core/object/ObjectListBaseTest.cc
code/branches/cpp11_v2/test/core/object/ObjectListIteratorTest.cc
code/branches/cpp11_v2/test/core/object/ObjectListTest.cc
code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc
code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc
code/branches/cpp11_v2/test/core/singleton/ScopeTest.cc
code/branches/cpp11_v2/test/util/SharedPtrTest.cc
code/branches/cpp11_v2/test/util/SingletonTest.cc
code/branches/cpp11_v2/test/util/output/ConsoleWriterTest.cc
code/branches/cpp11_v2/test/util/output/OutputManagerTest.cc
Log:
replace 'NULL' by 'nullptr'
Modified: code/branches/cpp11_v2/src/libraries/core/ApplicationPaths.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/ApplicationPaths.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/ApplicationPaths.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -83,7 +83,7 @@
#ifdef ORXONOX_PLATFORM_WINDOWS
// get executable module
TCHAR buffer[1024];
- if (GetModuleFileName(NULL, buffer, 1024) == 0)
+ if (GetModuleFileName(nullptr, buffer, 1024) == 0)
ThrowException(General, "Could not retrieve executable path.");
#elif defined(ORXONOX_PLATFORM_APPLE)
Modified: code/branches/cpp11_v2/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/BaseObject.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/BaseObject.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -204,7 +204,7 @@
Template* link;
assert(!(link = Template::getTemplate(temp->getLink())) || !link->isLink());
- link = NULL;
+ link = nullptr;
}
else
this->networkTemplateNames_.insert(temp->getName());
Modified: code/branches/cpp11_v2/src/libraries/core/BaseObject.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/BaseObject.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/BaseObject.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -264,7 +264,7 @@
else if (this->weakPtr_)
return this->weakPtr_;
else
- return NULL;
+ return nullptr;
}
template <class T>
Modified: code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -121,7 +121,7 @@
#else
char* userDataPathPtr(getenv("APPDATA"));
#endif
- if (userDataPathPtr == NULL)
+ if (userDataPathPtr == nullptr)
ThrowException(General, "Could not retrieve user data path.");
bf::path userDataPath(userDataPathPtr);
userDataPath /= ".orxonox";
Modified: code/branches/cpp11_v2/src/libraries/core/Core.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Core.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/Core.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -94,26 +94,26 @@
#endif
Core::Core(const std::string& cmdLine)
- : applicationPaths_(NULL)
- , configurablePaths_(NULL)
- , dynLibManager_(NULL)
- , signalHandler_(NULL)
- , configFileManager_(NULL)
- , languageInstance_(NULL)
- , loaderInstance_(NULL)
- , ioConsole_(NULL)
- , tclBind_(NULL)
- , tclThreadManager_(NULL)
- , rootScope_(NULL)
- , graphicsManager_(NULL)
- , inputManager_(NULL)
- , guiManager_(NULL)
- , graphicsScope_(NULL)
+ : applicationPaths_(nullptr)
+ , configurablePaths_(nullptr)
+ , dynLibManager_(nullptr)
+ , signalHandler_(nullptr)
+ , configFileManager_(nullptr)
+ , languageInstance_(nullptr)
+ , loaderInstance_(nullptr)
+ , ioConsole_(nullptr)
+ , tclBind_(nullptr)
+ , tclThreadManager_(nullptr)
+ , rootScope_(nullptr)
+ , graphicsManager_(nullptr)
+ , inputManager_(nullptr)
+ , guiManager_(nullptr)
+ , graphicsScope_(nullptr)
, bGraphicsLoaded_(false)
- , staticInitHandler_(NULL)
- , pluginManager_(NULL)
- , rootModule_(NULL)
- , config_(NULL)
+ , staticInitHandler_(nullptr)
+ , pluginManager_(nullptr)
+ , rootModule_(nullptr)
+ , config_(nullptr)
, destructionHelper_(this)
{
orxout(internal_status) << "initializing Core object..." << endl;
@@ -175,7 +175,7 @@
this->languageInstance_ = new Language();
// initialize root context
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
// Do this soon after the ConfigFileManager has been created to open up the
// possibility to configure everything below here
@@ -325,7 +325,7 @@
module->deleteAllStaticallyInitializedInstances();
this->dynLibManager_->unload(module->getDynLib());
- module->setDynLib(NULL);
+ module->setDynLib(nullptr);
}
void Core::loadGraphics()
@@ -470,7 +470,7 @@
this->guiManager_->preUpdate(time);
}
// Process console events and status line
- if (this->ioConsole_ != NULL)
+ if (this->ioConsole_ != nullptr)
this->ioConsole_->preUpdate(time);
// Process thread commands
this->tclThreadManager_->preUpdate(time);
Modified: code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -136,12 +136,12 @@
void CoreConfig::updateLastLevelTimestamp()
{
- ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(NULL)));
+ ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(nullptr)));
}
void CoreConfig::updateOgreConfigTimestamp()
{
- ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(NULL)));
+ ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(nullptr)));
}
Modified: code/branches/cpp11_v2/src/libraries/core/CoreIncludes.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/CoreIncludes.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/CoreIncludes.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -119,7 +119,7 @@
@param ClassName The name of the class
*/
#define RegisterAbstractClass(ClassName) \
- RegisterClassWithFactory(ClassName, static_cast<ClassFactory<ClassName>*>(NULL), false)
+ RegisterClassWithFactory(ClassName, static_cast<ClassFactory<ClassName>*>(nullptr), false)
/**
@brief Registers the class in the framework with a given Factory.
Modified: code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/GUIManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/GUIManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -267,20 +267,20 @@
@return true if success, otherwise false
*/
GUIManager::GUIManager(const std::pair<int, int>& mousePosition)
- : guiRenderer_(NULL)
- , resourceProvider_(NULL)
+ : guiRenderer_(nullptr)
+ , resourceProvider_(nullptr)
#ifndef ORXONOX_OLD_CEGUI
- , rqListener_(NULL)
- , imageCodec_(NULL)
+ , rqListener_(nullptr)
+ , imageCodec_(nullptr)
#endif
- , luaState_(NULL)
- , scriptModule_(NULL)
- , guiSystem_(NULL)
- , ceguiLogger_(NULL)
- , rootWindow_(NULL)
- , hudRootWindow_(NULL)
- , menuRootWindow_(NULL)
- , camera_(NULL)
+ , luaState_(nullptr)
+ , scriptModule_(nullptr)
+ , guiSystem_(nullptr)
+ , ceguiLogger_(nullptr)
+ , rootWindow_(nullptr)
+ , hudRootWindow_(nullptr)
+ , menuRootWindow_(nullptr)
+ , camera_(nullptr)
, destructionHelper_(this)
{
RegisterObject(GUIManager);
@@ -466,14 +466,14 @@
void GUIManager::setCamera(Ogre::Camera* camera)
{
#ifdef ORXONOX_OLD_CEGUI
- if (camera == NULL)
+ if (camera == nullptr)
this->guiRenderer_->setTargetSceneManager(0);
else
this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
#else
- if (camera_ != NULL && camera_->getSceneManager() != NULL)
+ if (camera_ != nullptr && camera_->getSceneManager() != nullptr)
camera_->getSceneManager()->removeRenderQueueListener(rqListener_);
- if (camera != NULL && camera->getSceneManager() != NULL)
+ if (camera != nullptr && camera->getSceneManager() != nullptr)
camera->getSceneManager()->addRenderQueueListener(rqListener_);
#endif
this->camera_ = camera;
@@ -875,7 +875,7 @@
if(CEGUI::FontManager::getSingleton().isFontPresent(name)) // If a font with that name already exists.
return;
- CEGUI::Font* font = NULL;
+ CEGUI::Font* font = nullptr;
CEGUI::XMLAttributes xmlAttributes;
// Attributes specified within CEGUIFont
@@ -891,7 +891,7 @@
xmlAttributes.add("AntiAlias", "true");
font = CEGUI::FontManager::getSingleton().createFont("FreeType", xmlAttributes);
- if(font != NULL)
+ if(font != nullptr)
font->load();
#else
if(CEGUI::FontManager::getSingleton().isDefined(name)) // If a font with that name already exists.
Modified: code/branches/cpp11_v2/src/libraries/core/Game.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Game.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/Game.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -76,11 +76,11 @@
};
Game::Game(const std::string& cmdLine)
- : gameClock_(NULL)
- , core_(NULL)
+ : gameClock_(nullptr)
+ , core_(nullptr)
, bChangingState_(false)
, bAbort_(false)
- , config_(NULL)
+ , config_(nullptr)
, destructionHelper_(this)
{
orxout(internal_status) << "initializing Game object..." << endl;
@@ -397,14 +397,14 @@
{
// Check parent and all its grand parents
shared_ptr<GameStateTreeNode> currentNode = lastRequestedNode;
- while (currentNode != NULL)
+ while (currentNode != nullptr)
{
if (currentNode->name_ == name)
break;
currentNode = currentNode->parent_.lock();
requestedNodes.push_back(currentNode);
}
- if (currentNode == NULL)
+ if (currentNode == nullptr)
requestedNodes.clear();
}
Modified: code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -177,7 +177,7 @@
*/
void GraphicsManager::upgradeToGraphics()
{
- if (renderWindow_ != NULL)
+ if (renderWindow_ != nullptr)
return;
orxout(internal_info) << "GraphicsManager upgrade to graphics" << endl;
Modified: code/branches/cpp11_v2/src/libraries/core/GraphicsManager.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/GraphicsManager.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/GraphicsManager.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -95,7 +95,7 @@
void upgradeToGraphics();
void loadDebugOverlay();
void unloadDebugOverlay();
- bool rendererLoaded() const { return renderWindow_ != NULL; }
+ bool rendererLoaded() const { return renderWindow_ != nullptr; }
void setCamera(Ogre::Camera* camera);
Modified: code/branches/cpp11_v2/src/libraries/core/Loader.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Loader.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/Loader.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -88,7 +88,7 @@
else
{
shared_ptr<ResourceInfo> info = Resource::getInfo(file->getFilename());
- if (info == NULL)
+ if (info == nullptr)
{
orxout(user_error, context::loader) << "Could not find XML file '" << file->getFilename() << "'." << endl;
return false;
Modified: code/branches/cpp11_v2/src/libraries/core/LuaState.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/LuaState.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/LuaState.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -47,7 +47,7 @@
LuaState::LuaState()
: bIsRunning_(false)
- , includeParseFunction_(NULL)
+ , includeParseFunction_(nullptr)
{
// Create new lua state and configure it
luaState_ = lua_open();
@@ -83,7 +83,7 @@
// Look in the current directory first
shared_ptr<ResourceInfo> sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename);
// Continue search in root directories
- if (sourceInfo == NULL && !sourceFileInfo_->path.empty())
+ if (sourceInfo == nullptr && !sourceFileInfo_->path.empty())
sourceInfo = Resource::getInfo(filename);
return sourceInfo;
}
@@ -91,7 +91,7 @@
bool LuaState::includeFile(const std::string& filename)
{
shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
- if (sourceInfo != NULL)
+ if (sourceInfo != nullptr)
return this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
else
{
@@ -104,12 +104,12 @@
{
// Parse string with provided include parser (otherwise don't preparse at all)
std::string luaInput;
- if (includeParseFunction_ != NULL)
+ if (includeParseFunction_ != nullptr)
luaInput = (*includeParseFunction_)(code);
else
luaInput = code;
- if (sourceFileInfo != NULL)
+ if (sourceFileInfo != nullptr)
{
// Also fill a map with the actual source code. This is just for the include* commands
// where the content of sourceFileInfo->filename doesn't match 'code'
@@ -118,10 +118,10 @@
bool returnValue = this->doString(luaInput, sourceFileInfo);
- if (sourceFileInfo != NULL)
+ if (sourceFileInfo != nullptr)
{
// Delete source code entry
- if (sourceFileInfo != NULL)
+ if (sourceFileInfo != nullptr)
this->sourceCodeMap_.erase(sourceFileInfo->filename);
}
@@ -131,7 +131,7 @@
bool LuaState::doFile(const std::string& filename)
{
shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
- if (sourceInfo != NULL)
+ if (sourceInfo != nullptr)
return this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
else
{
@@ -145,11 +145,11 @@
// Save the old source file info
shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
// Only override if sourceFileInfo provides useful information
- if (sourceFileInfo != NULL)
+ if (sourceFileInfo != nullptr)
sourceFileInfo_ = sourceFileInfo;
std::string chunkname;
- if (sourceFileInfo != NULL)
+ if (sourceFileInfo != nullptr)
{
// Provide lua_load with the filename for debug purposes
// The '@' is a Lua convention to identify the chunk name as filename
@@ -285,7 +285,7 @@
bool LuaState::fileExists(const std::string& filename)
{
shared_ptr<ResourceInfo> info = this->getFileInfo(filename);
- if (info == NULL)
+ if (info == nullptr)
return false;
else
return true;
@@ -300,7 +300,7 @@
if (it != this->sourceCodeMap_.end())
return it->second;
shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
- if (info == NULL)
+ if (info == nullptr)
return "";
else
return Resource::open(info)->getAsString();
Modified: code/branches/cpp11_v2/src/libraries/core/Resource.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Resource.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/Resource.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -101,9 +101,9 @@
ptr->group = group;
ptr->size = it->uncompressedSize;
#if OGRE_VERSION >= 0x010800
- if (dynamic_cast<const Ogre::FileSystemArchive*>(it->archive) != NULL)
+ if (dynamic_cast<const Ogre::FileSystemArchive*>(it->archive) != nullptr)
#else
- if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != NULL)
+ if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != nullptr)
#endif
{
boost::filesystem::path base(it->archive->getName());
Modified: code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -97,7 +97,7 @@
Returns a valid pointer of any derived type that is
registered in the class hierarchy.
@return
- Returns NULL if the no pointer was found.
+ Returns nullptr if the no pointer was found.
*/
ORX_FORCEINLINE void* getDerivedPointer(unsigned int classID)
{
@@ -106,7 +106,7 @@
if (this->objectPointers_[i].first == classID)
return this->objectPointers_[i].second;
}
- return NULL;
+ return nullptr;
}
/// Version of getDerivedPointer with template
Modified: code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Identifier.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/class/Identifier.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -278,7 +278,7 @@
public:
ClassIdentifier(const std::string& name, Factory* factory, bool bLoadable) : Identifier(name, factory, bLoadable)
{
- OrxVerify(ClassIdentifier<T>::classIdentifier_s == NULL, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
+ OrxVerify(ClassIdentifier<T>::classIdentifier_s == nullptr, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
ClassIdentifier<T>::classIdentifier_s = this;
SuperFunctionInitialization<0, T>::initialize(this);
@@ -333,10 +333,10 @@
template <class T>
/*static*/ inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
{
- if (ClassIdentifier<T>::classIdentifier_s == NULL)
+ if (ClassIdentifier<T>::classIdentifier_s == nullptr)
ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*) IdentifierManager::getInstance().getIdentifierByTypeInfo(typeid(T));
- OrxVerify(ClassIdentifier<T>::classIdentifier_s != NULL, "Did you forget to register the class of type " << typeid(T).name() << "?");
+ OrxVerify(ClassIdentifier<T>::classIdentifier_s != nullptr, "Did you forget to register the class of type " << typeid(T).name() << "?");
return ClassIdentifier<T>::classIdentifier_s;
}
@@ -450,7 +450,7 @@
template <class T>
void ClassIdentifier<T>::updateConfigValues(bool updateChildren) const
{
- this->updateConfigValues(updateChildren, static_cast<T*>(NULL));
+ this->updateConfigValues(updateChildren, static_cast<T*>(nullptr));
}
template <class T>
@@ -482,9 +482,9 @@
Casts on object of type Identifiable to any derived type that is
registered in the class hierarchy.
@return
- Returns NULL if the cast is not possible
+ Returns nullptr if the cast is not possible
@note
- In case of NULL return (and using MSVC), a dynamic_cast might still be possible if
+ In case of nullptr return (and using MSVC), a dynamic_cast might still be possible if
a class forgot to register its objects.
Also note that the function is implemented differently for GCC/MSVC.
*/
@@ -493,10 +493,10 @@
{
#ifdef ORXONOX_COMPILER_MSVC
typedef Loki::TypeTraits<typename Loki::TypeTraits<T>::PointeeType>::NonConstType ClassType;
- if (source != NULL)
+ if (source != nullptr)
return source->template getDerivedPointer<ClassType>(ClassIdentifier<ClassType>::getIdentifier()->getClassID());
else
- return NULL;
+ return nullptr;
#else
return dynamic_cast<T>(source);
#endif
Modified: code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -48,7 +48,7 @@
IdentifierManager::IdentifierManager()
{
this->hierarchyCreatingCounter_s = 0;
- this->recordTraceForIdentifier_ = NULL;
+ this->recordTraceForIdentifier_ = nullptr;
}
/**
@@ -91,7 +91,7 @@
// iterate over all identifiers, create one instance of each class and initialize the identifiers
{
- Context temporaryContext(NULL);
+ Context temporaryContext(nullptr);
for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
{
Identifier* identifier = (*it);
@@ -107,7 +107,7 @@
Identifiable* temp = identifier->fabricate(&temporaryContext);
- this->recordTraceForIdentifier_ = NULL;
+ this->recordTraceForIdentifier_ = nullptr;
if (temp->getIdentifier() != identifier)
orxout(internal_error) << "Newly created object of type " << identifier->getName() << " has unexpected identifier. Did you forget to use RegisterObject(classname)?" << endl;
@@ -148,7 +148,7 @@
orxout(internal_error) << "Identifier was registered late and is not initialized: " << (*it)->getName() << " / " << (*it)->getTypeInfo().name() << endl;
// for all initialized identifiers, check if a sample instance behaves as expected according to the class hierarchy
- Context temporaryContext(NULL);
+ Context temporaryContext(nullptr);
for (std::set<Identifier*>::const_iterator it1 = initializedIdentifiers.begin(); it1 != initializedIdentifiers.end(); ++it1)
{
if (!(*it1)->hasFactory())
Modified: code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -126,7 +126,7 @@
}
else
{
- orxout(internal_error) << "Can't assign NULL identifier" << endl;
+ orxout(internal_error) << "Can't assign nullptr identifier" << endl;
}
}
else
Modified: code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -118,7 +118,7 @@
/**
@brief Executes the command which was evaluated by this object and returns its return-value.
- @param error A pointer to an integer (or NULL) which will be used to write error codes to (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
+ @param error A pointer to an integer (or nullptr) which will be used to write error codes to (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
@return Returns the result of the command (or MultiType::Null if there is no return value)
*/
MultiType CommandEvaluation::query(int* error)
Modified: code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -136,7 +136,7 @@
static std::string getCommonBegin(const ArgumentCompletionList& list);
- const ConsoleCommand* execCommand_; ///< The command that will be executed (can be NULL if the command is not valid)
+ const ConsoleCommand* execCommand_; ///< The command that will be executed (can be nullptr if the command is not valid)
const ConsoleCommand* hintCommand_; ///< The command that is used to display hints and argument lists (can be different to execCommand_ in some cases)
SubString tokens_; ///< The single words of the command string, split into tokens
std::string string_; ///< The original command string, entered by the user in the shell
Modified: code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -80,7 +80,7 @@
/**
@brief Executes a command and returns its return-value.
@param command A string containing the command
- @param error A pointer to a value (or NULL) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
+ @param error A pointer to a value (or nullptr) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
@param useTcl If true, the command is passed to tcl (see TclBind)
@return Returns the return-value of the command (if any - MultiType::Null otherwise)
*/
@@ -126,7 +126,7 @@
/**
@brief Executes a command and returns its return-value as string.
@param command A string containing the command
- @param error A pointer to a value (or NULL) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
+ @param error A pointer to a value (or nullptr) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
@param useTcl If true, the command is passed to tcl (see TclBind)
@return Returns the return-value of the command converted to a string (or "" if there's no return value)
*/
Modified: code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -347,7 +347,7 @@
}
/**
- @brief Sets the functor to NULL (which also deactivates the command).
+ @brief Sets the functor to nullptr (which also deactivates the command).
*/
void ConsoleCommand::resetFunction()
{
Modified: code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -194,7 +194,7 @@
inline ConsoleCommandManipulator& popFunction()
{ if (this->command_) { this->command_->popFunction(); } return *this; }
- /// Sets the current function-pointer to NULL, which also deactivates the command.
+ /// Sets the current function-pointer to nullptr, which also deactivates the command.
inline ConsoleCommandManipulator& resetFunction()
{ if (this->command_) { this->command_->resetFunction(); } return *this; }
@@ -204,7 +204,7 @@
/// Pushes a new object on the object-stack.
inline ConsoleCommandManipulator& pushObject(void* object)
{ if (this->command_) { this->command_->pushObject(object); } return *this; }
- /// Removes the current object from the object-stack and restores the old object (or NULL if there's no object left on the stack).
+ /// Removes the current object from the object-stack and restores the old object (or nullptr if there's no object left on the stack).
inline ConsoleCommandManipulator& popObject()
{ if (this->command_) { this->command_->popObject(); } return *this; }
Modified: code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandIncludes.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandIncludes.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandIncludes.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -330,7 +330,7 @@
/**
@brief Returns a manipulator for a command with the given name.
- @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
+ @note If the command doesn't exist, the manipulator contains a nullptr to the command,
but it can still be used without checks, because all functions of ConsoleCommandManipulator
check internally if the command exists.
*/
@@ -339,7 +339,7 @@
/**
@brief Returns a manipulator for a command with the given group and name.
- @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
+ @note If the command doesn't exist, the manipulator contains a nullptr to the command,
but it can still be used without checks, because all functions of ConsoleCommandManipulator
check internally if the command exists.
*/
Modified: code/branches/cpp11_v2/src/libraries/core/command/Executor.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/Executor.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/Executor.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -75,7 +75,7 @@
/**
@brief Calls the wrapped function with arguments that are passed in a string.
@param arguments The arguments that should be passed to the function, separated by @a delimiter
- @param error A pointer to a variable (or NULL) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
+ @param error A pointer to a variable (or nullptr) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
@param delimiter The delimiter that is used to separate the arguments in the string @a arguments
@param bPrintError If true, errors are printed to the console if the function couldn't be executed with the given arguments
@return Returns the return value of the function (or MultiType::Null if there is no return value)
@@ -88,7 +88,7 @@
/**
@brief Calls the wrapped function with arguments that are passed as tokens in a SubString
@param arguments The arguments that should be passed to the function
- @param error A pointer to a variable (or NULL) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
+ @param error A pointer to a variable (or nullptr) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
@param delimiter The delimiter that was used to separate the arguments in the SubString @a arguments (used to join the surplus arguments)
@param bPrintError If true, errors are printed to the console if the function couldn't be executed with the given arguments
@return Returns the return value of the function (or MultiType::Null if there is no return value)
@@ -126,7 +126,7 @@
@brief Converts the arguments in a SubString to the right type, so they can be used to execute the function without further conversions.
@param arguments The arguments that should be converted
@param arg An array of MultiType where the converted arguments will be stored
- @param error A pointer to a variable (or NULL) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
+ @param error A pointer to a variable (or nullptr) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
@param delimiter The delimiter that was used to separate the arguments in the SubString @a arguments (used to join the surplus arguments)
@return Returns the number of evaluated arguments
*/
Modified: code/branches/cpp11_v2/src/libraries/core/command/Functor.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/Functor.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/Functor.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -214,7 +214,7 @@
/// Returns the object-pointer.
virtual void* getRawObjectPointer() const = 0;
- /// Enables or disables the safe mode which causes the functor to change the object pointer to NULL if the object is deleted (only member functors).
+ /// Enables or disables the safe mode which causes the functor to change the object pointer to nullptr if the object is deleted (only member functors).
virtual void setSafeMode(bool bSafeMode) = 0;
/// Returns the full identifier of the function-pointer which is defined as typeid(@a F), where @a F is the type of the stored function-pointer. Used to compare functors.
@@ -244,7 +244,7 @@
FunctorMember(O* object = 0) : object_(object), bSafeMode_(false) {}
virtual ~FunctorMember() { if (this->bSafeMode_) { this->unregisterObject(this->object_); } }
- /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
+ /// 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)
virtual MultiType operator()(O* object, 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) = 0;
// see Functor::operator()()
@@ -311,8 +311,8 @@
inline void objectDeleted()
{ this->object_ = 0; }
- O* object_; ///< The stored object-pointer, used to execute a member-function (or NULL for static functions)
- bool bSafeMode_; ///< If true, the functor is in safe mode and registers itself as listener at the object and changes the pointer to NULL if the object is deleted
+ O* object_; ///< The stored object-pointer, used to execute a member-function (or nullptr for static functions)
+ bool bSafeMode_; ///< If true, the functor is in safe mode and registers itself as listener at the object and changes the pointer to nullptr if the object is deleted
};
/// Specialization of FunctorMember with @a T = void.
@@ -323,7 +323,7 @@
/// Constructor: Stores the object-pointer.
FunctorMember(void* object = 0) {}
- /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
+ /// 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)
virtual MultiType operator()(void* object, 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) = 0;
// see Functor::operator()()
Modified: code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -43,7 +43,7 @@
namespace orxonox
{
- IOConsole* IOConsole::singletonPtr_s = NULL;
+ IOConsole* IOConsole::singletonPtr_s = nullptr;
namespace EscapeMode
{
@@ -352,11 +352,11 @@
const char* s;
if (!this->terminalWidth_ && (s = getenv("COLUMNS")))
- this->terminalWidth_ = strtol(s, NULL, 10);
+ this->terminalWidth_ = strtol(s, nullptr, 10);
if (!this->terminalWidth_)
this->terminalWidth_ = 80;
if (!this->terminalHeight_ && (s = getenv("LINES")))
- this->terminalHeight_ = strtol(s, NULL, 10);
+ this->terminalHeight_ = strtol(s, nullptr, 10);
if (!this->terminalHeight_)
this->terminalHeight_ = 24;
}
Modified: code/branches/cpp11_v2/src/libraries/core/command/IOConsoleWindows.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/IOConsoleWindows.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/IOConsoleWindows.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -40,7 +40,7 @@
namespace orxonox
{
- IOConsole* IOConsole::singletonPtr_s = NULL;
+ IOConsole* IOConsole::singletonPtr_s = nullptr;
//! Redirects std::cout, creates the corresponding Shell and changes the terminal mode
IOConsole::IOConsole()
@@ -299,7 +299,7 @@
SMALL_RECT oldRect = makeSMALL_RECT(0, this->inputLineRow_,
this->terminalWidth_ - 1, this->inputLineRow_ + this->inputLineHeight_ + this->statusLines_ - 1);
this->inputLineRow_ += linesDown;
- ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, this->inputLineRow_), &fillChar);
+ ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, nullptr, makeCOORD(0, this->inputLineRow_), &fillChar);
// Move cursor down to the new bottom so the user can see the status lines
COORD pos = makeCOORD(0, this->inputLineRow_ + this->inputLineHeight_ - 1 + this->statusLines_);
SetConsoleCursorPosition(stdOutHandle_, pos);
@@ -311,7 +311,7 @@
{
// Scroll output up
SMALL_RECT oldRect = makeSMALL_RECT(0, lines - linesDown, this->terminalWidth_ - 1, this->inputLineRow_ - 1);
- ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, 0), &fillChar);
+ ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, nullptr, makeCOORD(0, 0), &fillChar);
}
}
@@ -359,7 +359,7 @@
int statusLineRow = this->inputLineRow_ + this->inputLineHeight_;
SMALL_RECT oldRect = makeSMALL_RECT(0, statusLineRow, this->terminalWidth_ - 1, statusLineRow + this->statusLines_);
CHAR_INFO fillChar = {{' '}, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
- ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, statusLineRow + newLines), &fillChar);
+ ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, nullptr, makeCOORD(0, statusLineRow + newLines), &fillChar);
// Clear potential leftovers
if (-newLines - this->statusLines_ > 0)
{
Modified: code/branches/cpp11_v2/src/libraries/core/command/TclBind.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/TclBind.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/command/TclBind.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -227,7 +227,7 @@
/**
@brief Executes Tcl-code and returns the return-value.
@param tclcode A string that contains Tcl-code
- @param error A pointer to an integer (or NULL) that is used to write an error-code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
+ @param error A pointer to an integer (or nullptr) that is used to write an error-code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
@return Returns the return-value of the executed code (or an empty string if there's no return-value)
*/
std::string TclBind::eval(const std::string& tclcode, int* error)
Modified: code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -274,14 +274,14 @@
}
/**
- @brief Returns a pointer to the section with given name (or NULL if the section doesn't exist).
+ @brief Returns a pointer to the section with given name (or nullptr if the section doesn't exist).
*/
ConfigFileSection* ConfigFile::getSection(const std::string& section) const
{
for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
if ((*it)->getName() == section)
return (*it);
- return NULL;
+ return nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -43,10 +43,10 @@
ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;
- /// Constructor: Initializes the array of config files with NULL.
+ /// Constructor: Initializes the array of config files with nullptr.
ConfigFileManager::ConfigFileManager()
{
- this->configFiles_.assign(NULL);
+ this->configFiles_.assign(nullptr);
}
/// Destructor: Deletes the config files.
Modified: code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -98,7 +98,7 @@
}
/**
- @brief Returns the entry with given name (or NULL if it doesn't exist).
+ @brief Returns the entry with given name (or nullptr if it doesn't exist).
@param name The name of the entry
*/
@@ -109,11 +109,11 @@
if ((*it)->getName() == name)
return *it;
}
- return NULL;
+ return nullptr;
}
/**
- @brief Returns the entry of a vector element with given name and index (or NULL if it doesn't exist).
+ @brief Returns the entry of a vector element with given name and index (or nullptr if it doesn't exist).
@param name The name of the vector
@param index The index of the element in the vector
@@ -125,7 +125,7 @@
if (((*it)->getName() == name) && ((*it)->getIndex() == index))
return *it;
}
- return NULL;
+ return nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -222,7 +222,7 @@
/// Returns the name of the section this config value is in.
inline const std::string& getSectionName() const
{ return this->sectionname_; }
- /// Returns the associated identifier (can be NULL).
+ /// Returns the associated identifier (can be nullptr).
inline Identifier* getIdentifier() const
{ return this->identifier_; }
/// Returns true if this config-value is a vector.
Modified: code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -105,7 +105,7 @@
*/
void SettingsConfigFile::addConfigValueContainer(ConfigValueContainer* container)
{
- if (container == NULL)
+ if (container == nullptr)
return;
std::pair<std::string, ConfigValueContainer*> second(getLowercase(container->getName()), container);
this->containers_.insert(std::make_pair(getLowercase(container->getSectionName()), second));
@@ -117,7 +117,7 @@
*/
void SettingsConfigFile::removeConfigValueContainer(ConfigValueContainer* container)
{
- if (container == NULL)
+ if (container == nullptr)
return;
const std::string& sectionLC = getLowercase(container->getSectionName());
ContainerMap::iterator upper = this->containers_.upper_bound(sectionLC);
@@ -268,7 +268,7 @@
if (it->second.first == entryLC && ! it->second.second->isVector())
{
std::string value;
- it->second.second->getValue<std::string, void>(&value, NULL);
+ it->second.second->getValue<std::string, void>(&value, nullptr);
return value;
}
}
Modified: code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -209,7 +209,7 @@
}
catch (const std::exception& ex)
{
- oisInputManager_ = NULL;
+ oisInputManager_ = nullptr;
internalState_ |= Bad;
ThrowException(InitialisationFailed, "Could not initialise the input system: " << ex.what());
}
@@ -311,7 +311,7 @@
BOOST_FOREACH(InputDevice*& device, devices_)
{
- if (device == NULL)
+ if (device == nullptr)
continue;
const std::string& className = device->getClassName();
delete device;
@@ -320,7 +320,7 @@
}
devices_.resize(InputDeviceEnumerator::FirstJoyStick);
- assert(oisInputManager_ != NULL);
+ assert(oisInputManager_ != nullptr);
try
{
OIS::InputManager::destroyInputSystem(oisInputManager_);
@@ -330,7 +330,7 @@
orxout(internal_error, context::input) << "OIS::InputManager destruction failed" << ex.eText << '\n'
<< "Potential resource leak!" << endl;
}
- oisInputManager_ = NULL;
+ oisInputManager_ = nullptr;
internalState_ |= Bad;
orxout(verbose, context::input) << "Destroyed devices." << endl;
@@ -387,7 +387,7 @@
// Capture all the input and collect the function calls
// No event gets triggered here yet!
BOOST_FOREACH(InputDevice* device, devices_)
- if (device != NULL)
+ if (device != nullptr)
device->update(time);
// Collect function calls for the update
@@ -418,7 +418,7 @@
// and assign it to the corresponding device
for (unsigned int i = 0; i < devices_.size(); ++i)
{
- if (devices_[i] == NULL)
+ if (devices_[i] == nullptr)
continue;
std::vector<InputState*>& states = devices_[i]->getStateListRef();
bool occupied = false;
@@ -438,7 +438,7 @@
// Using an std::set to avoid duplicates
std::set<InputState*> tempSet;
for (unsigned int i = 0; i < devices_.size(); ++i)
- if (devices_[i] != NULL)
+ if (devices_[i] != nullptr)
for (unsigned int iState = 0; iState < devices_[i]->getStateListRef().size(); ++iState)
tempSet.insert(devices_[i]->getStateListRef()[iState]);
@@ -466,7 +466,7 @@
void InputManager::clearBuffers()
{
BOOST_FOREACH(InputDevice* device, devices_)
- if (device != NULL)
+ if (device != nullptr)
device->clearBuffers();
}
@@ -476,7 +476,7 @@
<< "When done, put the axex in the middle position and press enter." << endl;
BOOST_FOREACH(InputDevice* device, devices_)
- if (device != NULL)
+ if (device != nullptr)
device->startCalibration();
internalState_ |= Calibrating;
@@ -487,7 +487,7 @@
void InputManager::stopCalibration()
{
BOOST_FOREACH(InputDevice* device, devices_)
- if (device != NULL)
+ if (device != nullptr)
device->stopCalibration();
// restore old input state
@@ -508,7 +508,7 @@
std::pair<int, int> InputManager::getMousePosition() const
{
Mouse* mouse = static_cast<Mouse*>(devices_[InputDeviceEnumerator::Mouse]);
- if (mouse != NULL)
+ if (mouse != nullptr)
{
const OIS::MouseState state = mouse->getOISDevice()->getMouseState();
return std::make_pair(state.X.abs, state.Y.abs);
Modified: code/branches/cpp11_v2/src/libraries/core/input/InputManager.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputManager.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputManager.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -133,7 +133,7 @@
@brief
Returns a pointer to a InputState referenced by name.
@return
- Returns NULL if state was not found.
+ Returns nullptr if state was not found.
*/
InputState* getState(const std::string& name);
/**
Modified: code/branches/cpp11_v2/src/libraries/core/input/InputState.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputState.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputState.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -48,13 +48,13 @@
else
priority_ = 0;
- handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL);
+ handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), nullptr);
}
bool InputState::isInputDeviceEnabled(unsigned int device)
{
if (device < handlers_.size())
- return handlers_[device] != NULL;
+ return handlers_[device] != nullptr;
else
return false;
}
@@ -63,7 +63,7 @@
void InputState::JoyStickQuantityChanged(const std::vector<JoyStick*>& joyStickList)
{
unsigned int oldSize = handlers_.size();
- handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), NULL);
+ handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), nullptr);
for (unsigned int i = oldSize; i < handlers_.size(); ++i)
handlers_[i] = joyStickHandlerAll_;
Modified: code/branches/cpp11_v2/src/libraries/core/input/InputState.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputState.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputState.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -178,7 +178,7 @@
ORX_FORCEINLINE void InputState::update(float dt)
{
for (unsigned int i = 0; i < handlers_.size(); ++i)
- if (handlers_[i] != NULL)
+ if (handlers_[i] != nullptr)
INPUT_STATE_PUSH_CALL(i, allDevicesUpdated, dt);
}
@@ -187,17 +187,17 @@
switch (device)
{
case InputDeviceEnumerator::Keyboard:
- if (handlers_[keyboardIndex_s] != NULL)
+ if (handlers_[keyboardIndex_s] != nullptr)
INPUT_STATE_PUSH_CALL(keyboardIndex_s, keyboardUpdated, dt);
break;
case InputDeviceEnumerator::Mouse:
- if (handlers_[mouseIndex_s] != NULL)
+ if (handlers_[mouseIndex_s] != nullptr)
INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseUpdated, dt);
break;
default: // joy sticks
- if (handlers_[device] != NULL)
+ if (handlers_[device] != nullptr)
INPUT_STATE_PUSH_CALL(device, joyStickUpdated, device - firstJoyStickIndex_s, dt);
break;
}
@@ -207,7 +207,7 @@
ORX_FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
{
assert(device < handlers_.size());
- if (handlers_[device] != NULL)
+ if (handlers_[device] != nullptr)
{
// We have to store the function pointer to tell the compiler about its actual type because of overloading
void (InputHandler::*function)(unsigned int, ButtonTypeParam, EventType) = &InputHandler::buttonEvent<ButtonTypeParam>;
@@ -217,20 +217,20 @@
ORX_FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
{
- if (handlers_[mouseIndex_s] != NULL)
+ if (handlers_[mouseIndex_s] != nullptr)
INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseMoved, abs, rel, clippingSize);
}
ORX_FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
{
- if (handlers_[mouseIndex_s] != NULL)
+ if (handlers_[mouseIndex_s] != nullptr)
INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseScrolled, abs, rel);
}
ORX_FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
{
assert(device < handlers_.size());
- if (handlers_[device] != NULL)
+ if (handlers_[device] != nullptr)
INPUT_STATE_PUSH_CALL(device, axisMoved, device - firstJoyStickIndex_s, axis, value);
}
}
Modified: code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -52,8 +52,8 @@
KeyBinder::KeyBinder(const std::string& filename)
: deriveTime_(0.0f)
, filename_(filename)
- , configFile_(NULL)
- , fallbackConfigFile_(NULL)
+ , configFile_(nullptr)
+ , fallbackConfigFile_(nullptr)
{
mouseRelative_[0] = 0;
mouseRelative_[1] = 0;
@@ -169,7 +169,7 @@
compilePointerLists();
// load the bindings if required
- if (configFile_ != NULL)
+ if (configFile_ != nullptr)
{
for (unsigned int iDev = oldValue; iDev < joySticks_.size(); ++iDev)
{
Modified: code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -158,7 +158,7 @@
//! Name of the file used in this KeyBinder (constant!)
const std::string filename_;
- //! Config file used. NULL in case of KeyDetector. Also indicates whether we've already loaded.
+ //! Config file used. nullptr in case of KeyDetector. Also indicates whether we've already loaded.
ConfigFile* configFile_;
//! Config file from the data directory that only serves as fallback
ConfigFile* fallbackConfigFile_;
Modified: code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
RegisterAbstractClass(KeyBinderManager).inheritsFrom<Configurable>();
KeyBinderManager::KeyBinderManager()
- : currentBinder_(NULL)
+ : currentBinder_(nullptr)
, bDefaultFileLoaded_(true)
, bBinding_(false)
{
Modified: code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -106,7 +106,7 @@
void defaultFilenameChanged();
// KeyBinder management
- KeyBinder* currentBinder_; //! Currently selected KeyBinder (never NULL!)
+ KeyBinder* currentBinder_; //! Currently selected KeyBinder (never nullptr!)
std::map<std::string, KeyBinder*> binders_; //! All loaded KeyBinders
bool bDefaultFileLoaded_; //! Tells whether the default one is loaded
std::string defaultFilename_; //! Name of the file with the default key bindings
Modified: code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -61,7 +61,7 @@
KeyDetector::~KeyDetector()
{
- inputState_->setHandler(NULL);
+ inputState_->setHandler(nullptr);
InputManager::getInstance().destroyState("detector");
ModifyConsoleCommand(__CC_KeyDetector_callback_name).resetFunction();
}
Modified: code/branches/cpp11_v2/src/libraries/core/module/DynLib.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/DynLib.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/module/DynLib.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
DynLib::DynLib( const std::string& name )
{
mName = name;
- m_hInst = NULL;
+ m_hInst = nullptr;
}
//-----------------------------------------------------------------------
@@ -126,12 +126,12 @@
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
+ nullptr,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0,
- NULL
+ nullptr
);
std::string ret = (char*)lpMsgBuf;
// Free the buffer.
Modified: code/branches/cpp11_v2/src/libraries/core/module/DynLib.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/DynLib.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/module/DynLib.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -44,7 +44,7 @@
#if defined(ORXONOX_PLATFORM_WINDOWS)
# define DYNLIB_HANDLE hInstance
-# define DYNLIB_LOAD( a ) LoadLibraryEx( a, NULL, LOAD_WITH_ALTERED_SEARCH_PATH )
+# define DYNLIB_LOAD( a ) LoadLibraryEx( a, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH )
# define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
# define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
@@ -103,7 +103,7 @@
If the function succeeds, the returned value is a handle to
the symbol.
@par
- If the function fails, the returned value is <b>NULL</b>.
+ If the function fails, the returned value is <b>nullptr</b>.
*/
void* getSymbol( const std::string& strName ) const throw();
Modified: code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -32,11 +32,11 @@
namespace orxonox
{
- ModuleInstance* ModuleInstance::currentModuleInstance_s = NULL;
+ ModuleInstance* ModuleInstance::currentModuleInstance_s = nullptr;
ModuleInstance::ModuleInstance(const std::string& libraryName)
: libraryName_(libraryName)
- , dynLib_(NULL)
+ , dynLib_(nullptr)
{
}
Modified: code/branches/cpp11_v2/src/libraries/core/module/Plugin.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/Plugin.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/module/Plugin.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -37,12 +37,12 @@
Plugin::Plugin(const std::string& name, const std::string& libraryName) : name_(name), libraryName_(libraryName)
{
this->referenceCounter_ = 0;
- this->moduleInstance_ = NULL;
+ this->moduleInstance_ = nullptr;
}
Plugin::~Plugin()
{
- if (this->moduleInstance_ != NULL)
+ if (this->moduleInstance_ != nullptr)
{
this->referenceCounter_ = 1; // force unloading
this->unload();
@@ -76,7 +76,7 @@
orxout(internal_info) << "Unloading plugin " << this->name_ << "..." << endl;
Core::getInstance().unloadModule(this->moduleInstance_);
delete this->moduleInstance_;
- this->moduleInstance_ = NULL;
+ this->moduleInstance_ = nullptr;
}
else
orxout(internal_info) << "Reduced reference count for plugin " << this->name_ << " to " << this->referenceCounter_ << endl;
Modified: code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,8 +55,8 @@
PluginManager::~PluginManager()
{
- ModifyConsoleCommand("PluginManager", __CC_PluginManager_load_name).setObject(NULL);
- ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(NULL);
+ ModifyConsoleCommand("PluginManager", __CC_PluginManager_load_name).setObject(nullptr);
+ ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(nullptr);
for (std::map<std::string, PluginReference*>::iterator it = this->references_.begin(); it != this->references_.end(); ++it)
delete it->second;
@@ -88,7 +88,7 @@
void PluginManager::referencePlugin(const std::string& name)
{
Plugin* plugin = this->plugins_[name];
- if (plugin != NULL)
+ if (plugin != nullptr)
plugin->load();
else
orxout(internal_warning) << "Cannot find plugin with name " << name << endl;
@@ -97,7 +97,7 @@
void PluginManager::dereferencePlugin(const std::string& name)
{
Plugin* plugin = this->plugins_[name];
- if (plugin != NULL)
+ if (plugin != nullptr)
plugin->unload();
else
orxout(internal_warning) << "Cannot find plugin with name " << name << endl;
@@ -108,7 +108,7 @@
*/
void PluginManager::loadPlugin(const std::string& name)
{
- if (this->references_[name] == NULL)
+ if (this->references_[name] == nullptr)
{
this->references_[name] = new PluginReference(name);
}
@@ -123,9 +123,9 @@
void PluginManager::unloadPlugin(const std::string& name)
{
PluginReference* reference = this->references_[name];
- if (reference != NULL)
+ if (reference != nullptr)
{
- this->references_[name] = NULL;
+ this->references_[name] = nullptr;
delete reference;
}
else
Modified: code/branches/cpp11_v2/src/libraries/core/object/Context.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/Context.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/object/Context.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -45,13 +45,13 @@
{
static size_t count = 0;
// the first time this is called, ++count returns 1 and the context is created
- // the second time this is called, ++count returns 2 and NULL is returned because we're in the constructor of the context itself
+ // the second time this is called, ++count returns 2 and nullptr is returned because we're in the constructor of the context itself
// for each future call the context (now completely created) is returned
if (++count == 2)
- return NULL;
+ return nullptr;
else
{
- static Context context(NULL);
+ static Context context(nullptr);
return &context;
}
}
@@ -81,12 +81,12 @@
/*static*/ void Context::destroyRootContext()
{
delete Context::rootContext_s;
- Context::rootContext_s = NULL;
+ Context::rootContext_s = nullptr;
}
/*static*/ Context* Context::getRootContext()
{
- OrxVerify(Context::rootContext_s != NULL, "Root Context is undefined");
+ OrxVerify(Context::rootContext_s != nullptr, "Root Context is undefined");
return Context::rootContext_s;
}
@@ -104,6 +104,6 @@
{
ObjectListBase* objectList = this->getObjectList(identifier);
delete objectList;
- this->objectLists_[identifier->getClassID()] = NULL;
+ this->objectLists_[identifier->getClassID()] = nullptr;
}
}
Modified: code/branches/cpp11_v2/src/libraries/core/object/Destroyable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/Destroyable.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/object/Destroyable.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -65,7 +65,7 @@
*/
void Destroyable::destroy()
{
- assert(this); // Just in case someone tries to delete a NULL pointer
+ assert(this); // Just in case someone tries to delete a nullptr
this->requestedDestruction_ = true;
if (this->referenceCount_ == 0)
{
Modified: code/branches/cpp11_v2/src/libraries/core/object/IteratorBase.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/IteratorBase.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/object/IteratorBase.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -57,7 +57,7 @@
/**
@brief Constructor: Sets the element, whereon the iterator points, to the given element.
*/
- inline IteratorBase(ObjectListElement<T>* element = NULL)
+ inline IteratorBase(ObjectListElement<T>* element = nullptr)
{
this->element_ = element;
this->registerIterator();
@@ -150,7 +150,7 @@
*/
inline operator bool() const
{
- return (this->element_ != NULL);
+ return (this->element_ != nullptr);
}
/**
@@ -207,7 +207,7 @@
this->list_->registerRemovalListener(this);
}
else
- this->list_ = NULL;
+ this->list_ = nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -247,7 +247,7 @@
return *this->pointer_;
}
- /// Returns true if the wrapped pointer is NULL.
+ /// Returns true if the wrapped pointer is nullptr.
inline bool operator!() const
{
return (this->pointer_ == 0);
@@ -268,7 +268,7 @@
}
}
- /// Resets the strong pointer (equivalent to assigning a NULL pointer).
+ /// Resets the strong pointer (equivalent to assigning a nullptr).
inline void reset()
{
StrongPtr().swap(*this);
Modified: code/branches/cpp11_v2/src/libraries/core/object/WeakPtr.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/WeakPtr.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/object/WeakPtr.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -36,7 +36,7 @@
@anchor WeakPtrExample
A WeakPtr wraps a pointer to an object. If the object gets deleted, the WeakPtr becomes
- NULL. This can be used to store pointers to objects without knowing when they will be
+ nullptr. This can be used to store pointers to objects without knowing when they will be
destroyed.
WeakPtr works only with objects that are derived from orxonox::Destroyable, because
@@ -49,12 +49,12 @@
WeakPtr<MyClass> pointer = object; // create a WeakPtr and assign the object
- if (pointer) // checks if pointer is not NULL (which is true)
+ if (pointer) // checks if pointer is not nullptr (which is true)
pointer->someFunction(); // calls MyClass::someFunction()
object->destroy(); // calls destroy() which deletes the object
- if (pointer) // checks if pointer is not NULL (which is now false)
+ if (pointer) // checks if pointer is not nullptr (which is now false)
pointer->someFunction(); // this will not be executed
@endcode
In this example we assumed that MyClass is derived of Destroyable (otherwise it couldn't
@@ -90,7 +90,7 @@
namespace orxonox
{
/**
- @brief WeakPtr wraps a pointer to an object, which becomes NULL if the object is deleted.
+ @brief WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
@see See @ref WeakPtrExample "this description" for more information and an example.
*/
@@ -182,7 +182,7 @@
return *this->pointer_;
}
- /// Returns true if the wrapped pointer is NULL.
+ /// Returns true if the wrapped pointer is nullptr.
inline bool operator!() const
{
return (this->pointer_ == 0);
@@ -209,7 +209,7 @@
other.registerAsDestructionListener(other.base_);
}
- /// Resets the weak pointer (equivalent to assigning a NULL pointer).
+ /// Resets the weak pointer (equivalent to assigning a nullptr).
inline void reset()
{
WeakPtr().swap(*this);
Modified: code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonIncludes.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonIncludes.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonIncludes.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -70,7 +70,7 @@
*/
#define ManageScopedSingleton(className, scope, allowedToFail) \
- className* className::singletonPtr_s = NULL; \
+ className* className::singletonPtr_s = nullptr; \
static ScopedSingletonWrapper& className##ScopedSingletonWrapper \
= (new orxonox::SI_SSW(new ClassScopedSingletonWrapper<className, allowedToFail>(#className), scope))->getWrapper()
Modified: code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonWrapper.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonWrapper.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonWrapper.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -90,7 +90,7 @@
public:
ClassScopedSingletonWrapper(const std::string& className)
: ScopedSingletonWrapper(className)
- , singletonPtr_(NULL)
+ , singletonPtr_(nullptr)
{
}
@@ -103,16 +103,16 @@
//! Called if the Scope of the Singleton gets active (creates the instance)
void activated()
{
- assert(singletonPtr_ == NULL);
+ assert(singletonPtr_ == nullptr);
singletonPtr_ = new T();
}
//! Called if the Scope of this Singleton gets deactivated (destroys the instance)
void deactivated()
{
- assert(singletonPtr_ != NULL);
+ assert(singletonPtr_ != nullptr);
this->destroy(singletonPtr_);
- singletonPtr_ = NULL;
+ singletonPtr_ = nullptr;
}
//! Destroys the singleton instance - overloaded for Destroyable, calls Destroyable::destroy()
@@ -145,7 +145,7 @@
public:
ClassScopedSingletonWrapper(const std::string& className)
: ScopedSingletonWrapper(className)
- , singletonPtr_(NULL)
+ , singletonPtr_(nullptr)
{
}
@@ -158,7 +158,7 @@
//! Called if the Scope of the Singleton gets active (creates the instance)
void activated()
{
- assert(singletonPtr_ == NULL);
+ assert(singletonPtr_ == nullptr);
try
{ singletonPtr_ = new T(); }
catch (const InitialisationAbortedException& ex)
@@ -170,10 +170,10 @@
//! Called if the Scope of this Singleton gets deactivated (destroys the instance)
void deactivated()
{
- if (singletonPtr_ != NULL)
+ if (singletonPtr_ != nullptr)
{
this->destroy(singletonPtr_);
- singletonPtr_ = NULL;
+ singletonPtr_ = nullptr;
}
}
Modified: code/branches/cpp11_v2/src/libraries/network/ClientConnection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/ClientConnection.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/ClientConnection.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -43,7 +43,7 @@
ClientConnection::ClientConnection():
Connection(NETWORK_PEER_ID_SERVER),
established_(false),
- server_(NULL)
+ server_(nullptr)
{
this->serverAddress_ = new ENetAddress();
//set standard address and port
@@ -71,11 +71,11 @@
ENetEvent event;
// create host
- this->host_ = enet_host_create(NULL, NETWORK_CLIENT_MAX_CONNECTIONS, NETWORK_CHANNEL_COUNT, 0, 0);
+ this->host_ = enet_host_create(nullptr, NETWORK_CLIENT_MAX_CONNECTIONS, NETWORK_CHANNEL_COUNT, 0, 0);
- if ( this->host_ == NULL )
+ if ( this->host_ == nullptr )
{
- orxout(internal_error, context::network) << "ClientConnection: host_ == NULL" << endl;
+ orxout(internal_error, context::network) << "ClientConnection: host_ == nullptr" << endl;
// error handling
return false;
}
@@ -92,9 +92,9 @@
orxout(internal_info, context::network) << "Using IPv4 and IPv6 Sockets." << endl;
this->server_ = enet_host_connect(this->host_, serverAddress_, NETWORK_CHANNEL_COUNT, 0);
- if ( this->server_==NULL )
+ if ( this->server_==nullptr )
{
- orxout(internal_error, context::network) << "ClientConnection: server_ == NULL" << endl;
+ orxout(internal_error, context::network) << "ClientConnection: server_ == nullptr" << endl;
// error handling
return false;
}
Modified: code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -47,7 +47,7 @@
bool FunctionCall::execute(){
NetworkFunctionBase* fct = NetworkFunctionManager::getInstance().getFunctionByNetworkId( this->functionID_ );
- assert( fct != NULL );
+ assert( fct != nullptr );
assert( this->nrOfArguments_==this->arguments_.size() );
switch(this->nrOfArguments_)
{
Modified: code/branches/cpp11_v2/src/libraries/network/LANDiscoverable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/LANDiscoverable.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/LANDiscoverable.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -84,8 +84,8 @@
bindAddress.port = LAN_DISCOVERY_PORT;
assert( this->host_ == 0 );
this->host_ = enet_host_create( &bindAddress, 10, 0, 0, 0 );
- if ( this->host_ == NULL )
- orxout(internal_error, context::network) << "LANDiscoverable: host_ == NULL" << endl;
+ if ( this->host_ == nullptr )
+ orxout(internal_error, context::network) << "LANDiscoverable: host_ == nullptr" << endl;
}
else
{
Modified: code/branches/cpp11_v2/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/LANDiscovery.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/LANDiscovery.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -41,14 +41,14 @@
LANDiscovery::LANDiscovery()
{
- this->host_ = enet_host_create(NULL, 10, 0, 0, 0 );
- if ( this->host_ == NULL )
- orxout(internal_error, context::network) << "LANDiscovery: host_ == NULL" << endl;
+ this->host_ = enet_host_create(nullptr, 10, 0, 0, 0 );
+ if ( this->host_ == nullptr )
+ orxout(internal_error, context::network) << "LANDiscovery: host_ == nullptr" << endl;
}
LANDiscovery::~LANDiscovery()
{
- if (this->host_ != NULL)
+ if (this->host_ != nullptr)
enet_host_destroy(this->host_);
}
@@ -64,13 +64,13 @@
/* IPv4 */
address.host = ENET_HOST_BROADCAST;
peer = enet_host_connect(this->host_, &address, 0, 0);
- if (peer == NULL)
+ if (peer == nullptr)
orxout(internal_error, context::network) << "Could not send LAN discovery to IPv4 Broadcast." << endl;
/* IPv6 */
enet_address_set_host(&address, "ff02::1"); // TODO: use a multicast group
peer = enet_host_connect(this->host_, &address, 0, 0);
- if (peer == NULL)
+ if (peer == nullptr)
orxout(internal_error, context::network) << "Could not send LAN discovery to IPv6 Multicast." << endl;
ENetEvent event;
Modified: code/branches/cpp11_v2/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/MasterServer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/MasterServer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -42,7 +42,7 @@
//SetConsoleCommand( "ms-serverinfo", &MasterServer::serverInfo );
/* forward declaration so the linker doesn't complain */
- MasterServer *MasterServer::instance = NULL;
+ MasterServer *MasterServer::instance = nullptr;
/* command: list servers */
void
@@ -344,7 +344,7 @@
{
/***** ENTER MAIN LOOP *****/
ENetEvent *event = (ENetEvent *)calloc(sizeof(ENetEvent), sizeof(char));
- if( event == NULL )
+ if( event == nullptr )
{
orxout(user_error, context::master_server) << "Could not create ENetEvent structure, exiting." << endl;
exit( EXIT_FAILURE );
Modified: code/branches/cpp11_v2/src/libraries/network/MasterServerComm.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/MasterServerComm.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/MasterServerComm.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -53,14 +53,14 @@
/* initiate the client */
- this->client = enet_host_create( NULL /* create a client host */,
+ this->client = enet_host_create( nullptr /* create a client host */,
1,
2, /* allow up 2 channels to be used, 0 and 1 */
0,
0 );
/* see if it worked */
- if (this->client == NULL)
+ if (this->client == nullptr)
{ orxout(internal_error, context::master_server) << "An error occurred while trying to create an "
<< "ENet client host." << endl;
return 1;
@@ -84,7 +84,7 @@
/* Initiate the connection, allocating the two channels 0 and 1. */
this->peer = enet_host_connect(this->client, &this->address, 2, 0);
- if( this->peer == NULL )
+ if( this->peer == nullptr )
{ orxout(internal_error, context::master_server) << "No available peers for initiating an ENet"
<< " connection." << endl;
return -1;
@@ -156,7 +156,7 @@
orxout(verbose, context::master_server) << "polling masterserver..." << endl;
/* address buffer */
- char *addrconv = NULL;
+ char *addrconv = nullptr;
int retval = 0;
/* enet_host_service returns 0 if no event occured */
@@ -192,7 +192,7 @@
/* END DEBUG */
/* call the supplied callback, if any. */
- if( listener != NULL )
+ if( listener != nullptr )
retval = listener->rhandler( addrconv, &(this->event) );
/* clean up */
Modified: code/branches/cpp11_v2/src/libraries/network/NetworkFunctionManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/NetworkFunctionManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/NetworkFunctionManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -70,7 +70,7 @@
if(it != idMap_.end())
return it->second;
else
- return NULL;
+ return nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/libraries/network/PeerList.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/PeerList.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/PeerList.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -40,7 +40,7 @@
int
PeerList::addPeer( ENetPeer *toadd )
{ /* error correction */
- if( toadd == NULL )
+ if( toadd == nullptr )
{ orxout(internal_error, context::master_server) << "PeerList::addPeer: empty peer given." << endl;
return -1;
}
@@ -91,7 +91,7 @@
return *i;
/* not found */
- return NULL;
+ return nullptr;
}
int
Modified: code/branches/cpp11_v2/src/libraries/network/Server.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Server.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/Server.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -243,7 +243,7 @@
bool Server::sendObjectDeletes()
{
// ClientInformation *temp = ClientInformation::getBegin();
-// if( temp == NULL )
+// if( temp == nullptr )
//no client connected
if( this->clientIDs_.size()==0 )
return true;
@@ -254,7 +254,7 @@
return true; //everything ok (no deletes this tick)
}
// orxout(verbose, context::network) << "sending DeleteObjects" << endl;
-// while(temp != NULL){
+// while(temp != nullptr){
// if( !(temp->getSynched()) )
// {
// orxout(verbose_more, context::network) << "Server: not sending gamestate" << endl;
Modified: code/branches/cpp11_v2/src/libraries/network/ServerConnection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/ServerConnection.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/ServerConnection.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -72,9 +72,9 @@
// create host
this->host_ = enet_host_create(this->bindAddress_, NETWORK_MAX_CONNECTIONS, NETWORK_CHANNEL_COUNT, 0, 0);
- if ( this->host_ == NULL )
+ if ( this->host_ == nullptr )
{
- orxout(internal_error, context::network) << "ServerConnection: host_ == NULL" << endl;
+ orxout(internal_error, context::network) << "ServerConnection: host_ == nullptr" << endl;
return false;
}
Modified: code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -57,7 +57,7 @@
std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().getIdentifierByStringMap().begin();
for(;it != IdentifierManager::getInstance().getIdentifierByStringMap().end();++it){
id = it->second;
- if(id == NULL || !id->hasFactory())
+ if(id == nullptr || !id->hasFactory())
continue;
const std::string& classname = id->getName();
network_id = id->getNetworkID();
@@ -143,7 +143,7 @@
classname = temp+2*sizeof(uint32_t);
id=ClassByString( std::string((const char*)classname) );
orxout(internal_info, context::packets) << "processing classid: " << networkID << " name: " << classname << " id: " << id << endl;
- if(id==NULL){
+ if(id==nullptr){
orxout(user_error, context::packets) << "Received a bad classname" << endl;
abort();
}
Modified: code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/packet/Gamestate.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -607,7 +607,7 @@
uint32_t dest_length = header_.getDataSize();
if(dest_length==0)
- return NULL;
+ return nullptr;
uint8_t *ndata = new uint8_t[dest_length*sizeof(uint8_t)+GamestateHeader::getSize()];
uint8_t *dest = GAMESTATE_START(ndata);
@@ -644,7 +644,7 @@
uint32_t dest_length = header_.getDataSize();
if(dest_length==0)
- return NULL;
+ return nullptr;
uint8_t *ndata = new uint8_t[dest_length*sizeof(uint8_t)+GamestateHeader::getSize()];
uint8_t *dest = ndata + GamestateHeader::getSize();
Modified: code/branches/cpp11_v2/src/libraries/network/packet/Packet.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/packet/Packet.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/packet/Packet.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -121,7 +121,7 @@
// Destroy the ENetPacket if necessary.
// Note: For the case ENet used the callback to destroy the packet, we have already set
- // enetPacket_ to NULL to avoid destroying it again.
+ // enetPacket_ to nullptr to avoid destroying it again.
if (this->enetPacket_)
{
// enetPacket_->data gets destroyed too by ENet if it was allocated by it.
Modified: code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -104,11 +104,11 @@
*/
uint32_t Synchronisable::findContextID(Context* context)
{
- if (context == NULL)
+ if (context == nullptr)
return OBJECTID_UNKNOWN;
Synchronisable* synchronisableContext = orxonox_cast<Synchronisable*>(context);
- if (synchronisableContext != NULL)
+ if (synchronisableContext != nullptr)
return synchronisableContext->getObjectID();
else
return this->findContextID(context->getParentContext());
@@ -225,7 +225,7 @@
if (it1 != objectMap_.end())
return it1->second;
// if the objects not in the map it should'nt exist at all anymore
- return NULL;
+ return nullptr;
}
Modified: code/branches/cpp11_v2/src/libraries/tools/ResourceCollection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/tools/ResourceCollection.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/tools/ResourceCollection.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -92,7 +92,7 @@
ResourceLocation* ResourceCollection::getResourceLocation(unsigned int index) const
{
if (index >= resourceLocations_.size())
- return NULL;
+ return nullptr;
else
return resourceLocations_[index];
}
Modified: code/branches/cpp11_v2/src/libraries/tools/Shader.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/tools/Shader.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/tools/Shader.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -108,7 +108,7 @@
void Shader::changedCompositorName()
{
// For the moment, we get the viewport always from the graphics manager
- // TODO: Try to support multiple viewports - note however that scenemanager_->getCurrentViewport() returns NULL
+ // TODO: Try to support multiple viewports - note however that scenemanager_->getCurrentViewport() returns nullptr
// after switching to a camera in a different scene (only for the first time this scene is displayed though)
this->changedCompositorName(GraphicsManager::getInstance().getViewport());
}
Modified: code/branches/cpp11_v2/src/libraries/util/Clipboard.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/Clipboard.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/Clipboard.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -92,7 +92,7 @@
if (OpenClipboard(0))
{
HANDLE hData = GetClipboardData(CF_TEXT);
- if (hData == NULL)
+ if (hData == nullptr)
return "";
std::string output(static_cast<char*>(GlobalLock(hData)));
GlobalUnlock(hData);
Modified: code/branches/cpp11_v2/src/libraries/util/DestructionHelper.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/DestructionHelper.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/DestructionHelper.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -35,13 +35,13 @@
{
/** Deletes an object and resets the pointer
@param object
- Pointer to an object. Handing over NULL is safe.
+ Pointer to an object. Handing over nullptr is safe.
*/
template <class T>
void safeObjectDelete(T** object)
{
delete *object;
- *object = NULL;
+ *object = nullptr;
}
/** Utility class that helps to create a special kind of destructor that
Modified: code/branches/cpp11_v2/src/libraries/util/SharedPtr.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/SharedPtr.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/SharedPtr.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -214,7 +214,7 @@
friend class SharedPtr;
public:
- /// Default constructor, the pointer is set to NULL.
+ /// Default constructor, the pointer is set to nullptr.
inline SharedPtr() : pointer_(0), counter_(0)
{
}
@@ -309,7 +309,7 @@
return this->pointer_;
}
- /// Returns true if the pointer is not NULL.
+ /// Returns true if the pointer is not nullptr.
inline operator bool() const
{
return (this->pointer_ != 0);
Modified: code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -43,7 +43,7 @@
namespace orxonox
{
- SignalHandler* SignalHandler::singletonPtr_s = NULL;
+ SignalHandler* SignalHandler::singletonPtr_s = nullptr;
}
#if defined(ORXONOX_PLATFORM_LINUX)
@@ -174,7 +174,7 @@
dup2( gdbOut[1], STDOUT_FILENO );
dup2( gdbErr[1], STDERR_FILENO );
- execlp( "sh", "sh", "-c", "gdb", static_cast<void*>(NULL));
+ execlp( "sh", "sh", "-c", "gdb", static_cast<void*>(nullptr));
}
@@ -185,7 +185,7 @@
{
perror("pipe failed!\n");
kill( gdbPid, SIGTERM );
- waitpid( gdbPid, NULL, 0 );
+ waitpid( gdbPid, nullptr, 0 );
exit(EXIT_FAILURE);
}
@@ -195,7 +195,7 @@
{
perror("fork failed!\n");
kill( gdbPid, SIGTERM );
- waitpid( gdbPid, NULL, 0 );
+ waitpid( gdbPid, nullptr, 0 );
exit(EXIT_FAILURE);
}
@@ -296,8 +296,8 @@
}
- waitpid( sigPid, NULL, 0 );
- waitpid( gdbPid, NULL, 0 );
+ waitpid( sigPid, nullptr, 0 );
+ waitpid( gdbPid, nullptr, 0 );
int wsRemoved = 0;
@@ -311,7 +311,7 @@
if ( bt.length() > 0 )
bt.erase(0, 1);
- time_t now = time(NULL);
+ time_t now = time(nullptr);
std::string timeString =
"=======================================================\n"
@@ -387,17 +387,17 @@
/// Constructor: Initializes the values, but doesn't register the exception handler.
SignalHandler::SignalHandler()
{
- this->prevExceptionFilter_ = NULL;
+ this->prevExceptionFilter_ = nullptr;
}
/// Destructor: Removes the exception handler.
SignalHandler::~SignalHandler()
{
- if (this->prevExceptionFilter_ != NULL)
+ if (this->prevExceptionFilter_ != nullptr)
{
// Remove the unhandled exception filter function
SetUnhandledExceptionFilter(this->prevExceptionFilter_);
- this->prevExceptionFilter_ = NULL;
+ this->prevExceptionFilter_ = nullptr;
}
}
@@ -407,9 +407,9 @@
this->filename_ = filename;
// don't register twice
- assert(this->prevExceptionFilter_ == NULL);
+ assert(this->prevExceptionFilter_ == nullptr);
- if (this->prevExceptionFilter_ == NULL)
+ if (this->prevExceptionFilter_ == nullptr)
{
// Install the unhandled exception filter function
this->prevExceptionFilter_ = SetUnhandledExceptionFilter(&SignalHandler::exceptionFilter);
@@ -440,7 +440,7 @@
// write the crash log
std::ofstream crashlog(SignalHandler::getInstance().filename_.c_str());
- time_t now = time(NULL);
+ time_t now = time(nullptr);
crashlog << "=======================================================" << endl;
crashlog << "= Time: " << std::string(ctime(&now));
@@ -479,7 +479,7 @@
return EXCEPTION_CONTINUE_SEARCH;
}
- /// Returns the stack trace for either the current function, or, if @a pExceptionInfo is not NULL, for the given exception context.
+ /// Returns the stack trace for either the current function, or, if @a pExceptionInfo is not nullptr, for the given exception context.
/* static */ std::string SignalHandler::getStackTrace(PEXCEPTION_POINTERS pExceptionInfo)
{
// Initialise the symbol table to get function names:
@@ -624,7 +624,7 @@
#ifdef ORXONOX_COMPILER_GCC
int status;
- char* demangled = __cxxabiv1::__cxa_demangle(symbol->Name, NULL, NULL, &status);
+ char* demangled = __cxxabiv1::__cxa_demangle(symbol->Name, nullptr, nullptr, &status);
if (demangled)
{
output += demangled;
@@ -683,7 +683,7 @@
TCHAR szModule[MAX_PATH];
HMODULE hModule;
- std::string output = (GetModuleFileName(NULL, szModule, MAX_PATH) ? SignalHandler::getModuleName(szModule) : "Application");
+ std::string output = (GetModuleFileName(nullptr, szModule, MAX_PATH) ? SignalHandler::getModuleName(szModule) : "Application");
output += " caused ";
switch(pExceptionRecord->ExceptionCode)
Modified: code/branches/cpp11_v2/src/libraries/util/SignalHandler.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/SignalHandler.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/SignalHandler.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -112,7 +112,7 @@
void doCatch(const std::string& appName, const std::string& filename);
- static std::string getStackTrace(PEXCEPTION_POINTERS pExceptionInfo = NULL);
+ static std::string getStackTrace(PEXCEPTION_POINTERS pExceptionInfo = nullptr);
static std::string getExceptionType(PEXCEPTION_POINTERS pExceptionInfo);
private:
Modified: code/branches/cpp11_v2/src/libraries/util/Singleton.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/Singleton.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/Singleton.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -65,7 +65,7 @@
And don't forget to initialize the static singleton pointer in the source (*.cc) %file:
@code
- TestSingleton* TestSingleton::singletonPtr_s = NULL;
+ TestSingleton* TestSingleton::singletonPtr_s = nullptr;
@endcode
If a class inherits from orxonox::Singleton, it also inherits its functions. The most important
@@ -117,29 +117,29 @@
//! Returns a reference to the singleton instance
static T& getInstance()
{
- OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name());
+ OrxVerify(T::singletonPtr_s != nullptr, "T=" << typeid(T).name());
return *T::singletonPtr_s;
}
//! Tells whether the singleton has been created
static bool exists()
{
- return (T::singletonPtr_s != NULL);
+ return (T::singletonPtr_s != nullptr);
}
protected:
//! Constructor sets the singleton instance pointer
Singleton()
{
- OrxVerify(T::singletonPtr_s == NULL, "T=" << typeid(T).name());
+ OrxVerify(T::singletonPtr_s == nullptr, "T=" << typeid(T).name());
T::singletonPtr_s = static_cast<T*>(this);
}
//! Destructor resets the singleton instance pointer
virtual ~Singleton()
{
- OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name());
- T::singletonPtr_s = NULL;
+ OrxVerify(T::singletonPtr_s != nullptr, "T=" << typeid(T).name());
+ T::singletonPtr_s = nullptr;
}
private:
Modified: code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -96,7 +96,7 @@
for (size_t i = 1; i < this->numChunksPerBlock_ - 1; ++i)
setNext(block + i * this->chunkSize_, block + (i + 1) * this->chunkSize_);
- // the next_ pointer of the last chunk must point to NULL
+ // the next_ pointer of the last chunk must point to nullptr
setNext(block + (this->numChunksPerBlock_ - 1) * this->chunkSize_, 0);
// The second chunk in the block is assigned to the first_ pointer
Modified: code/branches/cpp11_v2/src/modules/designtools/ScreenshotManager.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/designtools/ScreenshotManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/designtools/ScreenshotManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -68,7 +68,7 @@
@brief
Constructor.
*/
- ScreenshotManager::ScreenshotManager() : finalPicturePB_(NULL), data_(NULL)
+ ScreenshotManager::ScreenshotManager() : finalPicturePB_(nullptr), data_(nullptr)
{
RegisterObject(ScreenshotManager);
@@ -89,15 +89,15 @@
*/
void ScreenshotManager::cleanup(void)
{
- if(this->finalPicturePB_ != NULL)
+ if(this->finalPicturePB_ != nullptr)
{
delete this->finalPicturePB_;
- this->finalPicturePB_ = NULL;
+ this->finalPicturePB_ = nullptr;
}
- if(this->data_ != NULL)
+ if(this->data_ != nullptr)
{
delete this->data_;
- this->data_ = NULL;
+ this->data_ = nullptr;
}
if(!this->tempTexture_.isNull())
this->tempTexture_.freeMethod();
@@ -150,7 +150,7 @@
{
// Get the screenshot.
Ogre::Image* finalImage = getScreenshot();
- if(finalImage != NULL)
+ if(finalImage != nullptr)
{
// Save it.
finalImage->save(ConfigurablePaths::getLogPathString() + "screenshot_" + getTimestamp() + this->fileExtension_);
@@ -172,8 +172,8 @@
*/
Ogre::Image* ScreenshotManager::getScreenshot()
{
- if(CameraManager::getInstance().getActiveCamera() == NULL )
- return NULL;
+ if(CameraManager::getInstance().getActiveCamera() == nullptr )
+ return nullptr;
return this->getScreenshot(CameraManager::getInstance().getActiveCamera()->getOgreCamera());
}
@@ -188,8 +188,8 @@
*/
Ogre::Image* ScreenshotManager::getScreenshot(Ogre::Camera* camera)
{
- if(camera == NULL)
- return NULL;
+ if(camera == nullptr)
+ return nullptr;
// Update the internal parameters.
this->update();
Modified: code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -145,8 +145,8 @@
return;
}
- ControllableEntity* entity = NULL;
- if(HumanController::getLocalControllerSingleton() != NULL && HumanController::getLocalControllerSingleton()->getControllableEntity() != NULL)
+ ControllableEntity* entity = nullptr;
+ if(HumanController::getLocalControllerSingleton() != nullptr && HumanController::getLocalControllerSingleton()->getControllableEntity() != nullptr)
entity = HumanController::getLocalControllerSingleton()->getControllableEntity();
else
{
Modified: code/branches/cpp11_v2/src/modules/docking/Dock.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/docking/Dock.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/docking/Dock.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -86,10 +86,10 @@
{
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
- PlayerInfo* player = NULL;
+ PlayerInfo* player = nullptr;
// Check whether it is a player trigger and extract pawn from it
- if(pTrigger != NULL)
+ if(pTrigger != nullptr)
{
if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
@@ -102,7 +102,7 @@
orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
return false;
}
- if(player == NULL)
+ if(player == nullptr)
{
orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
return false;
@@ -130,10 +130,10 @@
bool Dock::execute(bool bTriggered, BaseObject* trigger)
{
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
- PlayerInfo* player = NULL;
+ PlayerInfo* player = nullptr;
// Check whether it is a player trigger and extract pawn from it
- if(pTrigger != NULL)
+ if(pTrigger != nullptr)
{
if(!pTrigger->isForPlayer()) { // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
@@ -146,7 +146,7 @@
orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
return false;
}
- if(player == NULL)
+ if(player == nullptr)
{
orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
return false;
@@ -314,7 +314,7 @@
index--;
}
}
- return NULL;
+ return nullptr;
}
bool Dock::addEffect(DockingEffect* effect)
@@ -332,7 +332,7 @@
return *effect;
i--;
}
- return NULL;
+ return nullptr;
}
bool Dock::addAnimation(DockingAnimation* animation)
@@ -351,6 +351,6 @@
return *animation;
i--;
}
- return NULL;
+ return nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/docking/DockToShip.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/docking/DockToShip.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/docking/DockToShip.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,13 +71,13 @@
orxout(verbose, context::docking) << "DockToShip::attach" << endl;
DockingTarget *target = DockingEffect::findTarget(this->target_);
- if (target == NULL) {
+ if (target == nullptr) {
orxout(internal_warning, context::docking) << "Can't retrieve target for '" << this->target_ << "'.." << endl;
return false;
}
ControllableEntity *dockTo = (ControllableEntity*) target->getParent();
- if (dockTo == NULL) {
+ if (dockTo == nullptr) {
orxout(internal_warning, context::docking) << "Parent is not a ControllableEntity.." << endl;
return false;
}
Modified: code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/docking/DockingAnimation.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -44,7 +44,7 @@
{
RegisterObject(DockingAnimation);
- this->parent_ = NULL;
+ this->parent_ = nullptr;
}
DockingAnimation::~DockingAnimation()
Modified: code/branches/cpp11_v2/src/modules/docking/DockingController.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/docking/DockingController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/docking/DockingController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -43,9 +43,9 @@
{
RegisterObject(DockingController);
- this->dock_ = NULL;
- this->player_ = NULL;
- this->entity_ = NULL;
+ this->dock_ = nullptr;
+ this->player_ = nullptr;
+ this->entity_ = nullptr;
}
DockingController::~DockingController()
@@ -121,7 +121,7 @@
// give control back to player
this->player_->startControl(this->entity_);
this->setActive(false);
- this->controllableEntity_ = NULL;
+ this->controllableEntity_ = nullptr;
if (this->docking_)
this->dock_->dockingAnimationFinished(this->player_);
Modified: code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/docking/DockingEffect.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -69,7 +69,7 @@
if ((*it)->getName().compare(name) == 0)
return (*it);
}
- return NULL;
+ return nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/dodgerace/DodgeRace.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -66,7 +66,7 @@
void DodgeRace::levelUp()
{
level++;
- if (getPlayer() != NULL)
+ if (getPlayer() != nullptr)
{
for (int i = 0; i < 7; i++)
{
@@ -84,7 +84,7 @@
void DodgeRace::tick(float dt)
{
- if (getPlayer() != NULL)
+ if (getPlayer() != nullptr)
{
currentPosition = getPlayer()->getWorldPosition().x;
counter = counter + (currentPosition - lastPosition);
@@ -133,7 +133,7 @@
DodgeRaceShip* DodgeRace::getPlayer()
{
- if (player == NULL)
+ if (player == nullptr)
{
for (ObjectList<DodgeRaceShip>::iterator it = ObjectList<DodgeRaceShip>::begin(); it != ObjectList<DodgeRaceShip>::end(); ++it)
{
@@ -172,7 +172,7 @@
// Set variable to temporarily force the player to spawn.
this->bForceSpawn_ = false;
- if (this->center_ == NULL) // abandon mission!
+ if (this->center_ == nullptr) // abandon mission!
{
orxout(internal_error) << "DodgeRace: No Centerpoint specified." << endl;
GSLevel::startMainMenu();
Modified: code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceCenterPoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceCenterPoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceCenterPoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
void DodgeRaceCenterPoint::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(DodgeRace)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(DodgeRace)))
{
DodgeRace* DodgeRaceGametype = orxonox_cast<DodgeRace*>(this->getGametype());
DodgeRaceGametype->setCenterpoint(this);
Modified: code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceShip.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceShip.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/dodgerace/DodgeRaceShip.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -90,7 +90,7 @@
// Camera
Camera* camera = this->getCamera();
- if (camera != NULL)
+ if (camera != nullptr)
{
// camera->setPosition(Vector3(-pos.z, -posforeward, 0));
camera->setOrientation(Vector3::UNIT_Z, Degree(0));
@@ -151,7 +151,7 @@
DodgeRace* DodgeRaceShip::getGame()
{
- if (game == NULL)
+ if (game == nullptr)
{
for (ObjectList<DodgeRace>::iterator it = ObjectList<DodgeRace>::begin(); it != ObjectList<DodgeRace>::end(); ++it)
{
Modified: code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/gametypes/RaceCheckPoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -124,7 +124,7 @@
}
}
}
- return NULL;
+ return nullptr;
}
bool RaceCheckPoint::playerWasHere(PlayerInfo* player) const
Modified: code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -97,7 +97,7 @@
{
RaceCheckPoint* point2 = findCheckpoint((*numb));
- //if(point2 != NULL)
+ //if(point2 != nullptr)
//placeVirtualCheckpoints((*it), point2);
}
}
@@ -125,10 +125,10 @@
orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;*/
staticRacePoints_ = findStaticCheckpoints(nextRaceCheckpoint_, checkpoints);
// initialisation of currentRaceCheckpoint_
- currentRaceCheckpoint_ = NULL;
+ currentRaceCheckpoint_ = nullptr;
int i;
- for (i = -2; findCheckpoint(i) != NULL; i--)
+ for (i = -2; findCheckpoint(i) != nullptr; i--)
{
continue;
}
@@ -193,7 +193,7 @@
//orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
continue;
}
- if (findCheckpoint(*it) == NULL)
+ if (findCheckpoint(*it) == nullptr)
orxout(internal_warning) << "Problematic Point: " << (*it) << endl;
else
numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(*it), zaehler);
@@ -208,7 +208,7 @@
float SpaceRaceController::distanceSpaceshipToCheckPoint(RaceCheckPoint* CheckPoint)
{
- if (this->getControllableEntity() != NULL)
+ if (this->getControllableEntity() != nullptr)
{
return (CheckPoint->getPosition()- this->getControllableEntity()->getPosition()).length();
}
@@ -222,7 +222,7 @@
RaceCheckPoint* SpaceRaceController::nextPointFind(RaceCheckPoint* raceCheckpoint)
{
float minDistance = 0;
- RaceCheckPoint* minNextRaceCheckPoint = NULL;
+ RaceCheckPoint* minNextRaceCheckPoint = nullptr;
// find the next checkpoint with the minimal distance
for (std::set<int>::iterator it = raceCheckpoint->getNextCheckpoints().begin(); it != raceCheckpoint->getNextCheckpoints().end(); ++it)
@@ -230,7 +230,7 @@
RaceCheckPoint* nextRaceCheckPoint = findCheckpoint(*it);
float distance = recCalculateDistance(nextRaceCheckPoint, this->getControllableEntity()->getPosition());
- if (distance < minDistance || minNextRaceCheckPoint == NULL)
+ if (distance < minDistance || minNextRaceCheckPoint == nullptr)
{
minDistance = distance;
minNextRaceCheckPoint = nextRaceCheckPoint;
@@ -270,7 +270,7 @@
*/
RaceCheckPoint* SpaceRaceController::adjustNextPoint()
{
- if (currentRaceCheckpoint_ == NULL) // no Adjust possible
+ if (currentRaceCheckpoint_ == nullptr) // no Adjust possible
{
return nextRaceCheckpoint_;
@@ -291,7 +291,7 @@
for (size_t i = 0; i < this->checkpoints_.size(); ++i)
if (this->checkpoints_[i]->getCheckpointIndex() == index)
return this->checkpoints_[i];
- return NULL;
+ return nullptr;
}
/*RaceCheckPoint* SpaceRaceController::addVirtualCheckPoint( RaceCheckPoint* previousCheckpoint, int indexFollowingCheckPoint , const Vector3& virtualCheckPointPosition )
@@ -346,7 +346,7 @@
void SpaceRaceController::tick(float dt)
{
- if (this->getControllableEntity() == NULL || this->getControllableEntity()->getPlayer() == NULL )
+ if (this->getControllableEntity() == nullptr || this->getControllableEntity()->getPlayer() == nullptr )
{
//orxout()<< this->getControllableEntity() << " in tick"<<endl;
return;
@@ -418,7 +418,7 @@
for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)
{
btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
- if(currentShape == NULL)
+ if(currentShape == nullptr)
continue;
currentShape->getBoundingSphere(positionObject,radiusObject);
@@ -446,7 +446,7 @@
for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape) != 0; everyShape++)
{
btCollisionShape* currentShape = (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape();
- if(currentShape == NULL)
+ if(currentShape == nullptr)
continue;
currentShape->getBoundingSphere(positionObject,radiusObject);
@@ -490,7 +490,7 @@
for (ObjectList<StaticEntity>::iterator it = ObjectList<StaticEntity>::begin(); it!= ObjectList<StaticEntity>::end(); ++it)
{
- if (dynamic_cast<RaceCheckPoint*>(*it) != NULL)
+ if (dynamic_cast<RaceCheckPoint*>(*it) != nullptr)
{
continue;
} // does not work jet
@@ -536,12 +536,12 @@
// {
// btVector3 positionObject;
// btScalar radiusObject;
- // if((*it)==NULL)
+ // if((*it)==nullptr)
// { orxout()<<"Problempoint 1.1"<<endl; continue;}
// //TODO: Probably it points on a wrong object
// for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++)
// {
- // if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==NULL)
+ // if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr)
// { continue;}
//
// orxout()<<"Problempoint 2.1"<<endl;
@@ -569,11 +569,11 @@
// {
// btVector3 positionObject;
// btScalar radiusObject;
- // if((*it)==NULL)
+ // if((*it)==nullptr)
// { orxout()<<"Problempoint 1"<<endl; continue;}
// for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++)
// {
- // if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==NULL)
+ // if((*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()==nullptr)
// { orxout()<<"Problempoint 2.2"<<endl; continue;}
// (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()->getBoundingSphere(positionObject,radiusObject);
// Vector3 positionObjectNonBT(positionObject.x(), positionObject.y(), positionObject.z());
Modified: code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/gametypes/SpaceRaceManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -70,7 +70,7 @@
this->players_ = this->race_->getPlayers();
- if (this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
+ if (this->checkpoints_[0] != nullptr && !this->firstcheckpointvisible_)
{
this->checkpoints_[0]->setRadarVisibility(true);
this->firstcheckpointvisible_ = true;
@@ -120,7 +120,7 @@
bool SpaceRaceManager::reachedValidCheckpoint(RaceCheckPoint* oldCheckpoint, RaceCheckPoint* newCheckpoint, PlayerInfo* player) const
{
- if (oldCheckpoint != NULL)
+ if (oldCheckpoint != nullptr)
{
// the player already visited an old checkpoint; see which checkpoints are possible now
const std::set<int>& possibleCheckpoints = oldCheckpoint->getNextCheckpoints();
Modified: code/branches/cpp11_v2/src/modules/invader/Invader.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/invader/Invader.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/invader/Invader.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -77,7 +77,7 @@
void Invader::levelUp()
{
level++;
- if (getPlayer() != NULL)
+ if (getPlayer() != nullptr)
{
for (int i = 0; i < 7; i++)
{
@@ -95,7 +95,7 @@
InvaderShip* Invader::getPlayer()
{
- if (player == NULL)
+ if (player == nullptr)
{
for (ObjectList<InvaderShip>::iterator it = ObjectList<InvaderShip>::begin(); it != ObjectList<InvaderShip>::end(); ++it)
player = *it;
@@ -105,7 +105,7 @@
void Invader::spawnEnemy()
{
- if (getPlayer() == NULL)
+ if (getPlayer() == nullptr)
return;
for (int i = 0; i < (3*log10(static_cast<double>(level)) + 1); i++)
@@ -157,7 +157,7 @@
// Set variable to temporarily force the player to spawn.
this->bForceSpawn_ = true;
- if (this->center_ == NULL) // abandon mission!
+ if (this->center_ == nullptr) // abandon mission!
{
orxout(internal_error) << "Invader: No Centerpoint specified." << endl;
GSLevel::startMainMenu();
Modified: code/branches/cpp11_v2/src/modules/invader/InvaderCenterPoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/invader/InvaderCenterPoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/invader/InvaderCenterPoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
void InvaderCenterPoint::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(Invader)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Invader)))
{
Invader* InvaderGametype = orxonox_cast<Invader*>(this->getGametype());
InvaderGametype->setCenterpoint(this);
Modified: code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
if (lifetime > 5000)
removeHealth(2000);
- if (player != NULL)
+ if (player != nullptr)
{
float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
setVelocity(Vector3(1000.f - level * 100 , 0, newZ));
@@ -72,7 +72,7 @@
Invader* InvaderEnemy::getGame()
{
- if (game == NULL)
+ if (game == nullptr)
{
for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
game = *it;
@@ -83,7 +83,7 @@
void InvaderEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
{
Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
- if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
+ if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
getGame()->addPoints(42);
}
}
Modified: code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -58,7 +58,7 @@
if (lifetime > 20000)
removeHealth(2000);
- if (player != NULL)
+ if (player != nullptr)
{
float distPlayer = player->getPosition().z - getPosition().z;
// orxout() << "i'm different!" << endl;
@@ -76,7 +76,7 @@
void InvaderEnemyShooter::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
{
Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
- if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
+ if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
getGame()->addPoints(3*42);
}
}
Modified: code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -94,7 +94,7 @@
// Camera
Camera* camera = this->getCamera();
- if (camera != NULL)
+ if (camera != nullptr)
{
camera->setPosition(Vector3(-pos.z, -posforeward, 0));
camera->setOrientation(Vector3::UNIT_Z, Degree(90));
@@ -153,7 +153,7 @@
InvaderEnemy* enemy = orxonox_cast<InvaderEnemy*>(otherObject);
Projectile* shot = orxonox_cast<Projectile*>(otherObject);
// ensure that this gets only called once per enemy.
- if (enemy != NULL && lastEnemy != enemy)
+ if (enemy != nullptr && lastEnemy != enemy)
{
lastEnemy = enemy;
@@ -164,9 +164,9 @@
}
}
// was shot, decrease multiplier
- else if (shot != NULL && lastShot != shot)
+ else if (shot != nullptr && lastShot != shot)
{
- if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != NULL)
+ if (getGame() && orxonox_cast<InvaderEnemy*>(shot->getShooter()) != nullptr)
{
if (getGame()->multiplier > 1)
{
@@ -181,7 +181,7 @@
Invader* InvaderShip::getGame()
{
- if (game == NULL)
+ if (game == nullptr)
{
for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
game = *it;
Modified: code/branches/cpp11_v2/src/modules/jump/Jump.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/Jump.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/Jump.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -82,7 +82,7 @@
{
SUPER(Jump, tick, dt);
- if (figure_ != NULL)
+ if (figure_ != nullptr)
{
Vector3 figurePosition = figure_->getPosition();
Vector3 figureVelocity = figure_->getVelocity();
@@ -129,7 +129,7 @@
}
- if (camera != NULL)
+ if (camera != nullptr)
{
Vector3 cameraPosition = Vector3(0, totalScreenShift_, 0);
camera->setPosition(cameraPosition);
@@ -274,9 +274,9 @@
void Jump::start()
{
- if (center_ != NULL) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
+ if (center_ != nullptr) // There needs to be a JumpCenterpoint, i.e. the area the game takes place.
{
- if (figure_ == NULL)
+ if (figure_ == nullptr)
{
figure_ = new JumpFigure(center_->getContext());
figure_->addTemplate(center_->getFigureTemplate());
@@ -297,7 +297,7 @@
// Call start for the parent class.
Deathmatch::start();
- if (figure_ != NULL)
+ if (figure_ != nullptr)
{
camera = figure_->getCamera();
}
@@ -324,7 +324,7 @@
{
assert(player);
- if (figure_->getPlayer() == NULL)
+ if (figure_->getPlayer() == nullptr)
{
player->startControl(figure_);
players_[player].state_ = PlayerState::Alive;
@@ -333,7 +333,7 @@
PlayerInfo* Jump::getPlayer() const
{
- if (this->figure_ != NULL)
+ if (this->figure_ != nullptr)
{
return this->figure_->getPlayer();
}
@@ -345,7 +345,7 @@
void Jump::addPlatform(JumpPlatform* newPlatform, std::string platformTemplate, float xPosition, float zPosition)
{
- if (newPlatform != NULL && center_ != NULL)
+ if (newPlatform != nullptr && center_ != nullptr)
{
newPlatform->addTemplate(platformTemplate);
newPlatform->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -413,7 +413,7 @@
void Jump::addProjectile(float xPosition, float zPosition)
{
JumpProjectile* newProjectile = new JumpProjectile(center_->getContext());
- if (newProjectile != NULL && center_ != NULL)
+ if (newProjectile != nullptr && center_ != nullptr)
{
newProjectile->addTemplate(center_->getProjectileTemplate());
newProjectile->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -426,7 +426,7 @@
void Jump::addSpring(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
{
JumpSpring* newSpring = new JumpSpring(center_->getContext());
- if (newSpring != NULL && center_ != NULL)
+ if (newSpring != nullptr && center_ != nullptr)
{
newSpring->addTemplate(center_->getSpringTemplate());
newSpring->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -439,7 +439,7 @@
void Jump::addSpring(JumpPlatform* platform)
{
JumpSpring* newSpring = new JumpSpring(center_->getContext());
- if (newSpring != NULL && center_ != NULL)
+ if (newSpring != nullptr && center_ != nullptr)
{
newSpring->addTemplate(center_->getSpringTemplate());
newSpring->setPosition(Vector3(0.0, 0.0, 0.0));
@@ -452,7 +452,7 @@
void Jump::addRocket(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
{
JumpRocket* newRocket = new JumpRocket(center_->getContext());
- if (newRocket != NULL && center_ != NULL)
+ if (newRocket != nullptr && center_ != nullptr)
{
newRocket->addTemplate(center_->getRocketTemplate());
newRocket->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -465,7 +465,7 @@
void Jump::addRocket(JumpPlatform* platform)
{
JumpRocket* newRocket = new JumpRocket(center_->getContext());
- if (newRocket != NULL && center_ != NULL)
+ if (newRocket != nullptr && center_ != nullptr)
{
newRocket->addTemplate(center_->getRocketTemplate());
newRocket->setPosition(Vector3(0.0, 0.0, 0.0));
@@ -478,7 +478,7 @@
void Jump::addPropeller(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
{
JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
- if (newPropeller != NULL && center_ != NULL)
+ if (newPropeller != nullptr && center_ != nullptr)
{
newPropeller->addTemplate(center_->getPropellerTemplate());
newPropeller->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -491,7 +491,7 @@
void Jump::addPropeller(JumpPlatform* platform)
{
JumpPropeller* newPropeller = new JumpPropeller(center_->getContext());
- if (newPropeller != NULL && center_ != NULL)
+ if (newPropeller != nullptr && center_ != nullptr)
{
newPropeller->addTemplate(center_->getPropellerTemplate());
newPropeller->setPosition(Vector3(0.0, 0.0, 0.0));
@@ -504,7 +504,7 @@
void Jump::addBoots(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
{
JumpBoots* newBoots = new JumpBoots(center_->getContext());
- if (newBoots != NULL && center_ != NULL)
+ if (newBoots != nullptr && center_ != nullptr)
{
newBoots->addTemplate(center_->getBootsTemplate());
newBoots->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -517,7 +517,7 @@
void Jump::addBoots(JumpPlatform* platform)
{
JumpBoots* newBoots = new JumpBoots(center_->getContext());
- if (newBoots != NULL && center_ != NULL)
+ if (newBoots != nullptr && center_ != nullptr)
{
newBoots->addTemplate(center_->getBootsTemplate());
newBoots->setPosition(Vector3(0.0, 0.0, 0.0));
@@ -530,7 +530,7 @@
void Jump::addShield(float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
{
JumpShield* newShield = new JumpShield(center_->getContext());
- if (newShield != NULL && center_ != NULL)
+ if (newShield != nullptr && center_ != nullptr)
{
newShield->addTemplate(center_->getShieldTemplate());
newShield->setPosition(Vector3(xPosition, 0.0, zPosition));
@@ -543,7 +543,7 @@
void Jump::addShield(JumpPlatform* platform)
{
JumpShield* newShield = new JumpShield(center_->getContext());
- if (newShield != NULL && center_ != NULL)
+ if (newShield != nullptr && center_ != nullptr)
{
newShield->addTemplate(center_->getShieldTemplate());
newShield->setPosition(Vector3(0.0, 0.0, 0.0));
@@ -556,7 +556,7 @@
void Jump::addEnemy(int type, float xPosition, float zPosition, float leftBoundary, float rightBoundary, float lowerBoundary, float upperBoundary, float xVelocity, float zVelocity)
{
JumpEnemy* newEnemy = new JumpEnemy(center_->getContext());
- if (newEnemy != NULL && center_ != NULL)
+ if (newEnemy != nullptr && center_ != nullptr)
{
switch (type)
{
@@ -1269,21 +1269,21 @@
float Jump::getFuel() const
{
- if (this->figure_ != NULL)
+ if (this->figure_ != nullptr)
{
- if (this->figure_->rocketActive_ != NULL)
+ if (this->figure_->rocketActive_ != nullptr)
{
return this->figure_->rocketActive_->getFuelState();
}
- else if (this->figure_->propellerActive_ != NULL)
+ else if (this->figure_->propellerActive_ != nullptr)
{
return this->figure_->propellerActive_->getFuelState();
}
- else if (this->figure_->shieldActive_ != NULL)
+ else if (this->figure_->shieldActive_ != nullptr)
{
return this->figure_->shieldActive_->getFuelState();
}
- else if (this->figure_->bootsActive_ != NULL)
+ else if (this->figure_->bootsActive_ != nullptr)
{
return this->figure_->bootsActive_->getFuelState();
}
Modified: code/branches/cpp11_v2/src/modules/jump/JumpBoots.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpBoots.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpBoots.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,7 +71,7 @@
Vector3 rocketPosition = getWorldPosition();
- if (attachedToFigure_ == false && figure_ != NULL)
+ if (attachedToFigure_ == false && figure_ != nullptr)
{
Vector3 figurePosition = figure_->getWorldPosition();
Modified: code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -82,7 +82,7 @@
void JumpCenterpoint::checkGametype()
{
- if (getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
+ if (getGametype() != nullptr && this->getGametype()->isA(Class(Jump)))
{
Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype());
jumpGametype->setCenterpoint(this);
Modified: code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -118,7 +118,7 @@
// Interact with Figure
Vector3 enemyPosition = getPosition();
- if (figure_ != NULL)
+ if (figure_ != nullptr)
{
Vector3 figurePosition = figure_->getPosition();
if(figurePosition.x > enemyPosition.x-width_ && figurePosition.x < enemyPosition.x+width_ && figurePosition.z > enemyPosition.z-height_ && figurePosition.z < enemyPosition.z+height_)
Modified: code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -50,8 +50,8 @@
RegisterObject(JumpFigure);
// initialize variables
- leftHand_ = NULL;
- rightHand_ = NULL;
+ leftHand_ = nullptr;
+ rightHand_ = nullptr;
fieldHeight_ = 0;
fieldWidth_ = 0;
jumpSpeed_ = 0.0;
@@ -74,10 +74,10 @@
handAngle_ = 0.0;
animateHands_ = false;
turnUp_ = false;
- rocketActive_ = NULL;
- propellerActive_ = NULL;
- bootsActive_ = NULL;
- shieldActive_ = NULL;
+ rocketActive_ = nullptr;
+ propellerActive_ = nullptr;
+ bootsActive_ = nullptr;
+ shieldActive_ = nullptr;
rocketSpeed_ = 0.0;
propellerSpeed_ = 0.0;
dead_ = false;
@@ -110,11 +110,11 @@
// Move up/down
Vector3 velocity = getVelocity();
- if (rocketActive_ != NULL)
+ if (rocketActive_ != nullptr)
{
velocity.z = rocketSpeed_;
}
- else if (propellerActive_ != NULL)
+ else if (propellerActive_ != nullptr)
{
velocity.z = propellerSpeed_;
}
@@ -143,11 +143,11 @@
animateHands_ = false;
}
- if (leftHand_ != NULL)
+ if (leftHand_ != nullptr)
{
leftHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(-handAngle_));
}
- if (rightHand_ != NULL)
+ if (rightHand_ != nullptr)
{
rightHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(handAngle_));
}
@@ -211,7 +211,7 @@
if (dead_ == false)
{
Vector3 velocity = getVelocity();
- if (bootsActive_ == NULL)
+ if (bootsActive_ == nullptr)
{
velocity.z = 1.2f*jumpSpeed_;
}
@@ -238,7 +238,7 @@
void JumpFigure::CollisionWithEnemy(JumpEnemy* enemy)
{
- if (rocketActive_ == NULL && propellerActive_ == NULL && shieldActive_ == NULL)
+ if (rocketActive_ == nullptr && propellerActive_ == nullptr && shieldActive_ == nullptr)
{
dead_ = true;
}
@@ -246,7 +246,7 @@
bool JumpFigure::StartRocket(JumpRocket* rocket)
{
- if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
+ if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
{
attach(rocket);
rocket->setPosition(0.0, rocketPos_, 0.0);
@@ -265,12 +265,12 @@
rocket->setVelocity(0.0, 0.0, 0.0);
detach(rocket);
rocket->destroy();
- rocketActive_ = NULL;
+ rocketActive_ = nullptr;
}
bool JumpFigure::StartPropeller(JumpPropeller* propeller)
{
- if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
+ if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
{
attach(propeller);
propeller->setPosition(0.0, 0.0, propellerPos_);
@@ -289,12 +289,12 @@
propeller->setVelocity(0.0, 0.0, 0.0);
detach(propeller);
propeller->destroy();
- propellerActive_ = NULL;
+ propellerActive_ = nullptr;
}
bool JumpFigure::StartBoots(JumpBoots* boots)
{
- if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
+ if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
{
attach(boots);
boots->setPosition(0.0, 0.0, bootsPos_);
@@ -313,7 +313,7 @@
boots->setVelocity(0.0, 0.0, 0.0);
detach(boots);
boots->destroy();
- bootsActive_ = NULL;
+ bootsActive_ = nullptr;
}
bool JumpFigure::StartShield(JumpShield* shield)
@@ -337,7 +337,7 @@
shield->setVelocity(0.0, 0.0, 0.0);
detach(shield);
shield->destroy();
- shieldActive_ = NULL;
+ shieldActive_ = nullptr;
}
void JumpFigure::InitializeAnimation(Context* context)
Modified: code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -85,7 +85,7 @@
Vector3 platformPosition = this->getPosition();
- if (figure_ != NULL)
+ if (figure_ != nullptr)
{
Vector3 figurePosition = figure_->getPosition();
Vector3 figureVelocity = figure_->getVelocity();
Modified: code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -46,7 +46,7 @@
{
RegisterObject(JumpPlatformTimer);
- particleSpawner_ = NULL;
+ particleSpawner_ = nullptr;
setProperties(3.0);
@@ -70,7 +70,7 @@
SUPER(JumpPlatformTimer, tick, dt);
time_ -= dt;
- if (time_ < effectStartTime_ && particleSpawner_ == NULL)
+ if (time_ < effectStartTime_ && particleSpawner_ == nullptr)
{
particleSpawner_ = new ParticleSpawner(getContext());
Modified: code/branches/cpp11_v2/src/modules/jump/JumpPropeller.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpPropeller.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpPropeller.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,7 +71,7 @@
Vector3 PropellerPosition = getWorldPosition();
- if (attachedToFigure_ == false && figure_ != NULL)
+ if (attachedToFigure_ == false && figure_ != nullptr)
{
Vector3 figurePosition = figure_->getWorldPosition();
Modified: code/branches/cpp11_v2/src/modules/jump/JumpRocket.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpRocket.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpRocket.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,7 +71,7 @@
Vector3 rocketPosition = getWorldPosition();
- if (attachedToFigure_ == false && figure_ != NULL)
+ if (attachedToFigure_ == false && figure_ != nullptr)
{
Vector3 figurePosition = figure_->getWorldPosition();
Modified: code/branches/cpp11_v2/src/modules/jump/JumpScore.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpScore.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpScore.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -47,7 +47,7 @@
{
RegisterObject(JumpScore);
- owner_ = NULL;
+ owner_ = nullptr;
showScore_ = false;
showFuel_ = false;
showMessages_ = false;
@@ -72,13 +72,13 @@
{
SUPER(JumpScore, tick, dt);
- if (owner_ != NULL)
+ if (owner_ != nullptr)
{
if (!owner_->hasEnded())
{
player_ = owner_->getPlayer();
- if (player_ != NULL)
+ if (player_ != nullptr)
{
if (showScore_ == true)
{
@@ -115,13 +115,13 @@
{
SUPER(JumpScore, changedOwner);
- if (this->getOwner() != NULL && this->getOwner()->getGametype())
+ if (this->getOwner() != nullptr && this->getOwner()->getGametype())
{
this->owner_ = orxonox_cast<Jump*>(this->getOwner()->getGametype());
}
else
{
- this->owner_ = NULL;
+ this->owner_ = nullptr;
}
}
}
Modified: code/branches/cpp11_v2/src/modules/jump/JumpShield.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpShield.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpShield.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,7 +71,7 @@
Vector3 shieldPosition = getWorldPosition();
- if (attachedToFigure_ == false && figure_ != NULL)
+ if (attachedToFigure_ == false && figure_ != nullptr)
{
Vector3 figurePosition = figure_->getWorldPosition();
Modified: code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -76,7 +76,7 @@
Vector3 springPosition = getWorldPosition();
- if (figure_ != NULL)
+ if (figure_ != nullptr)
{
Vector3 figurePosition = figure_->getWorldPosition();
Vector3 figureVelocity = figure_->getVelocity();
Modified: code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/mini4dgame/Mini4Dgame.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -87,7 +87,7 @@
*/
void Mini4Dgame::cleanup()
{
- if(this->board_ != NULL)// Destroy the board, if present.
+ if(this->board_ != nullptr)// Destroy the board, if present.
{
//this->board_->destroy();
this->board_ = 0;
@@ -100,10 +100,10 @@
*/
void Mini4Dgame::start()
{
- if (this->board_ != NULL) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
+ if (this->board_ != nullptr) // There needs to be a Mini4DgameCenterpoint, i.e. the area the game takes place.
{
/*
- if (this->board_ == NULL)
+ if (this->board_ == nullptr)
{
this->board_ = new Mini4DgameBoard(this->board_->getContext());
// Apply the template for the ball specified by the centerpoint.
@@ -173,7 +173,7 @@
{
assert(player);
- if(false)//this->player_ == NULL)
+ if(false)//this->player_ == nullptr)
{
//this->player_ = player;
this->players_[player].state_ = PlayerState::Alive;
Modified: code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameBoard.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameBoard.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameBoard.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -904,7 +904,7 @@
*/
void Mini4DgameBoard::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(Mini4Dgame)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Mini4Dgame)))
{
Mini4Dgame* Mini4DgameGametype = orxonox_cast<Mini4Dgame*>(this->getGametype());
Mini4DgameGametype->setGameboard(this);
Modified: code/branches/cpp11_v2/src/modules/notifications/NotificationDispatcher.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/notifications/NotificationDispatcher.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/notifications/NotificationDispatcher.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -176,10 +176,10 @@
}
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
- PlayerInfo* player = NULL;
+ PlayerInfo* player = nullptr;
// If the trigger is a PlayerTrigger.
- if(pTrigger != NULL)
+ if(pTrigger != nullptr)
{
if(!pTrigger->isForPlayer()) // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
return false;
@@ -189,7 +189,7 @@
else
return false;
- if(player == NULL)
+ if(player == nullptr)
{
orxout(verbose, context::notifications) << "The NotificationDispatcher was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
return false;
Modified: code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/notifications/NotificationManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -333,7 +333,7 @@
// If all senders are the target of the NotificationQueue, then the list of Notifications for that specific NotificationQueue is the same as the list of all Notifications.
bool bAll = set.find(NotificationListener::ALL) != set.end();
- std::multimap<std::time_t, Notification*>* map = NULL;
+ std::multimap<std::time_t, Notification*>* map = nullptr;
if(bAll)
this->notificationLists_[queue->getName()] = &this->allNotificationsList_;
// Else a new list (resp. multimap) is created and added to the list of Notification lists for NotificationQueues.
@@ -394,14 +394,14 @@
@param name
The name of the NotificationQueue.
@return
- Returns a pointer to the NotificationQueue with the input name. Returns NULL if no NotificationQueue with such a name exists.
+ Returns a pointer to the NotificationQueue with the input name. Returns nullptr if no NotificationQueue with such a name exists.
*/
NotificationQueue* NotificationManager::getQueue(const std::string & name)
{
std::map<const std::string, NotificationQueue*>::iterator it = this->queues_.find(name);
- // Returns NULL if no such NotificationQueue exists.
+ // Returns nullptr if no such NotificationQueue exists.
if(it == this->queues_.end())
- return NULL;
+ return nullptr;
return (*it).second;
}
Modified: code/branches/cpp11_v2/src/modules/notifications/NotificationQueueCEGUI.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/notifications/NotificationQueueCEGUI.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/notifications/NotificationQueueCEGUI.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -289,13 +289,13 @@
@param name
The name of the NotificationQueueCEGUI to be got.
@return
- Returns a pointer to the NotificationQueueCEGUI, or NULL if it doesn't exist.
+ Returns a pointer to the NotificationQueueCEGUI, or nullptr if it doesn't exist.
*/
/*static*/ NotificationQueueCEGUI* NotificationQueueCEGUI::getQueue(const std::string& name)
{
NotificationQueue* queue = NotificationManager::getInstance().getQueue(name);
- if(queue == NULL || !queue->isA(Class(NotificationQueueCEGUI)))
- return NULL;
+ if(queue == nullptr || !queue->isA(Class(NotificationQueueCEGUI)))
+ return nullptr;
return static_cast<NotificationQueueCEGUI*>(queue);
}
Modified: code/branches/cpp11_v2/src/modules/objects/Script.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/Script.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/Script.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -139,10 +139,10 @@
orxout(verbose, context::misc::script) << "Script (&" << this << ") triggered." << endl;
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
- PlayerInfo* player = NULL;
+ PlayerInfo* player = nullptr;
// If the trigger is a PlayerTrigger.
- if(pTrigger != NULL)
+ if(pTrigger != nullptr)
{
if(!pTrigger->isForPlayer()) // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
return false;
@@ -152,7 +152,7 @@
else
return false;
- if(player == NULL) //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.
+ if(player == nullptr) //TODO: Will this ever happen? If not, change in NotificationDispatcher as well.
{
orxout(internal_warning) << "The Script was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
return false;
Modified: code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -60,7 +60,7 @@
for( std::vector<BillboardAdministration>::iterator current = this->billboards_.begin(); current != this->billboards_.end(); current++)
{
- if( current->billy != NULL)
+ if( current->billy != nullptr)
{
delete current->billy;
}
@@ -126,7 +126,7 @@
void SpaceBoundaries::setBillboardOptions(Billboard *billy)
{
- if(billy != NULL)
+ if(billy != nullptr)
{
billy->setMaterial("Grid");
billy->setBillboardType(Ogre::BBT_PERPENDICULAR_COMMON);
@@ -249,7 +249,7 @@
float SpaceBoundaries::computeDistance(WorldEntity *item)
{
- if(item != NULL)
+ if(item != nullptr)
{
Vector3 itemPosition = item->getWorldPosition();
return (itemPosition.distance(this->getWorldPosition()));
@@ -309,7 +309,7 @@
bool SpaceBoundaries::isHumanPlayer(Pawn *item)
{
- if(item != NULL)
+ if(item != nullptr)
{
if(item->getPlayer())
{
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -96,7 +96,7 @@
std::queue<MultiTriggerState*>* DistanceMultiTrigger::letTrigger(void)
{
- std::queue<MultiTriggerState*>* queue = NULL;
+ std::queue<MultiTriggerState*>* queue = nullptr;
// Check for objects that were in range but no longer are. Iterate through all objects, that are in range.
for(std::set<WeakPtr<WorldEntity> >::iterator it = this->range_.begin(); it != this->range_.end(); )
@@ -104,7 +104,7 @@
WorldEntity* entity = *it;
// If the entity no longer exists.
- if(entity == NULL)
+ if(entity == nullptr)
{
this->range_.erase(it++);
continue;
@@ -117,7 +117,7 @@
this->range_.erase(it++);
// If no queue has been created, yet.
- if(queue == NULL)
+ if(queue == nullptr)
queue = new std::queue<MultiTriggerState*>();
// Create a state and append it to the queue.
@@ -185,7 +185,7 @@
entity = entity->getParent();
// If no queue has been created, yet.
- if(queue == NULL)
+ if(queue == nullptr)
queue = new std::queue<MultiTriggerState*>();
// Create a state and append it to the queue.
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/DistanceTrigger.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -105,7 +105,7 @@
if(targetId->isA(pawnId))
this->setForPlayer(true);
- if (targetId == NULL)
+ if (targetId == nullptr)
{
orxout(internal_error, context::triggers) << "\"" << targetStr << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ')' << endl;
return;
@@ -146,7 +146,7 @@
bool DistanceTrigger::checkDistance()
{
// Check whether there is a cached object, it still exists and whether it is still in range, if so nothing further needs to be done.
- if(this->cache_ != NULL)
+ if(this->cache_ != nullptr)
{
if((this->cache_->getWorldPosition() - this->getWorldPosition()).length() < this->distance_)
return true;
@@ -205,10 +205,10 @@
entity = entity->getParent();
Pawn* pawn = orxonox_cast<Pawn*>(entity);
- if(pawn != NULL)
+ if(pawn != nullptr)
this->setTriggeringPawn(pawn);
else
- orxout(internal_warning, context::triggers) << "Pawn was NULL." << endl;
+ orxout(internal_warning, context::triggers) << "Pawn was nullptr." << endl;
}
// Add the entity to the cache.
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/EventMultiTrigger.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/EventMultiTrigger.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/EventMultiTrigger.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -95,7 +95,7 @@
void EventMultiTrigger::trigger(bool bTriggered, BaseObject* originator)
{
// If the originator is a MultiTriggerContainer, the event originates from a MultiTrigger and thus the event only triggers the EventMultiTrigger for the originator that caused the MultiTrigger to trigger.
- if(originator != NULL && originator->isA(ClassIdentifier<MultiTriggerContainer>::getIdentifier()))
+ if(originator != nullptr && originator->isA(ClassIdentifier<MultiTriggerContainer>::getIdentifier()))
{
MultiTriggerContainer* container = static_cast<MultiTriggerContainer*>(originator);
// If the entity that triggered the MultiTrigger is no target of this EventMultiTrigger we process it as it weren't an event caused by a MultiTrigger.
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -123,15 +123,15 @@
// Let the MultiTrigger return the states that trigger and process the new states if there are any.
std::queue<MultiTriggerState*>* queue = this->letTrigger();
- if(queue != NULL)
+ if(queue != nullptr)
{
while(queue->size() > 0)
{
MultiTriggerState* state = queue->front();
- // If the state is NULL. (This really shouldn't happen)
- if(state == NULL)
+ // If the state is nullptr. (This really shouldn't happen)
+ if(state == nullptr)
{
- orxout(internal_error, context::triggers) << "In MultiTrigger '" << this->getName() << "' (&" << this << "), Error: State of new states queue was NULL. State ignored." << endl;
+ orxout(internal_error, context::triggers) << "In MultiTrigger '" << this->getName() << "' (&" << this << "), Error: State of new states queue was nullptr. State ignored." << endl;
queue->pop();
continue;
}
@@ -226,7 +226,7 @@
if(bFire)
{
// If the MultiTrigger is set to broadcast and has no originator a boradcast is fired.
- if(this->getBroadcast() && state->originator == NULL)
+ if(this->getBroadcast() && state->originator == nullptr)
this->broadcast(bActive);
// Else a normal event is fired.
else
@@ -239,13 +239,13 @@
if(bStateChanged)
{
// Print some debug output if the state has changed.
- if(state->originator != NULL)
+ if(state->originator != nullptr)
orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: " << state->originator->getIdentifier()->getName() << " (&" << state->originator << "), active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
else
- orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: NULL, active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
+ orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << ") changed state. originator: nullptr, active: " << bActive << ", triggered: " << state->bTriggered << "." << endl;
// If the MultiTrigger has a parent trigger, that is itself a MultiTrigger, it needs to call a method to notify him, that its activity has changed.
- if(this->parent_ != NULL && this->parent_->isMultiTrigger())
+ if(this->parent_ != nullptr && this->parent_->isMultiTrigger())
static_cast<MultiTrigger*>(this->parent_)->childActivityChanged(state->originator);
}
@@ -298,7 +298,7 @@
Identifier* target = ClassByString(targetStr);
// If the target is not a valid class name display an error.
- if (target == NULL)
+ if (target == nullptr)
{
orxout(internal_error, context::triggers) << "'" << targetStr << "' is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << endl;
return;
@@ -326,7 +326,7 @@
Identifier* target = ClassByString(targetStr);
// If the target is not a valid class name display an error.
- if (target == NULL)
+ if (target == nullptr)
{
orxout(internal_error, context::triggers) << "'" << targetStr << "' is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << endl;
return;
@@ -345,7 +345,7 @@
*/
std::queue<MultiTriggerState*>* MultiTrigger::letTrigger(void)
{
- return NULL;
+ return nullptr;
}
/**
@@ -442,8 +442,8 @@
*/
void MultiTrigger::fire(bool status, BaseObject* originator)
{
- // If the originator is NULL, a normal event without MultiTriggerContainer is sent.
- if(originator == NULL)
+ // If the originator is nullptr, a normal event without MultiTriggerContainer is sent.
+ if(originator == nullptr)
{
this->fireEvent(status);
orxout(verbose, context::triggers) << "MultiTrigger '" << this->getName() << "' (&" << this << "): Fired event. status: " << status << "." << endl;
@@ -478,7 +478,7 @@
*/
bool MultiTrigger::addState(MultiTriggerState* state)
{
- assert(state); // The state really shouldn't be NULL.
+ assert(state); // The state really shouldn't be nullptr.
// If the originator is no target of this MultiTrigger.
if(!this->isTarget(state->originator))
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.h
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -75,7 +75,7 @@
- @b invert Invert is a boolean, if true the MultiTrigger is in <em>invert-mode</em>, meaning, that if the triggering condition is fulfilled the MultiTrigger will have the state <em>not triggered</em> and and if the condition is not fulfilled it will have the state <em>triggered</em>. In short it just inverts the behavior of the MultiTrigger. The default is <code>false</code>.
- @b simultaneousTriggerers The number of simultaneous triggerers limits the number of objects that are allowed to trigger the MultiTrigger at the same time. Or more precisely, the number of distinct objects the MultiTrigger has <em>triggered</em> states for, at each point in time. The default is <code>-1</code>, which denotes infinity.
- @b mode The mode describes how the MultiTrigger acts in relation to all the triggers, that are appended to it. There are 3 modes: <em>and</em>, meaning that the MultiTrigger can only be triggered if all the appended triggers are active. <em>or</em>, meaning that the MultiTrigger can only triggered if at least one of the appended triggers is active. And <em>xor</em>, meaning that the MultiTrigger can only be triggered if one and only one appended trigger is active. Note, that I wrote <em>can only be active</em>, that implies, that there is an additional condition to the <em>activity</em> of the MultiTrigger and that is the fulfillment of the triggering condition (the MultiTrigger itself doesn't have one, but all derived classes should). Also bear in mind, that the <em>activity</em> of a MultiTrigger is still coupled to the object that triggered it. The default is <em>and</em>.
- - @b broadcast Broadcast is a boolean, if true the MutliTrigger is in <em>broadcast-mode</em>, meaning, that all trigger events that are caused by no originator (originator is NULL) are broadcast as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger. The default is false.
+ - @b broadcast Broadcast is a boolean, if true the MutliTrigger is in <em>broadcast-mode</em>, meaning, that all trigger events that are caused by no originator (originator is nullptr) are broadcast as having come from every possible originator, or more precisely as having come from all objects that are specified targets of this MultiTrigger. The default is false.
- @b target The target describes the kind of objects that are allowed to trigger this MultiTrigger. The default is @ref orxonox::Pawn "Pawn".
- Also there is the possibility of appending triggers (as long as they inherit from TriggerBase) to the MultiTrigger just by adding them as children in the XML description of your MultiTrigger.
@@ -109,8 +109,8 @@
@return Returns if the MultiTrigger is active.
*/
inline bool isActive(void) const
- { return this->isActive(NULL); }
- bool isActive(BaseObject* triggerer = NULL) const; //!< Check whether the MultiTrigger is active for a given object.
+ { return this->isActive(nullptr); }
+ bool isActive(BaseObject* triggerer = nullptr) const; //!< Check whether the MultiTrigger is active for a given object.
/**
@brief Set the number of objects that are allowed to simultaneously trigger this MultiTrigger.
@@ -144,19 +144,19 @@
@return Returns true if the input object is a target, false if not.
*/
inline bool isTarget(BaseObject* target)
- { if(target == NULL) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
+ { if(target == nullptr) return true; else return targetMask_.isIncluded(target->getIdentifier()); }
void addTarget(const std::string& targets); //!< Add some target to the MultiTrigger.
protected:
virtual std::queue<MultiTriggerState*>* letTrigger(void); //!< This method is called by the MultiTrigger to get information about new trigger events that need to be looked at.
- void changeTriggered(BaseObject* originator = NULL); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
+ void changeTriggered(BaseObject* originator = nullptr); //!< This method can be called by any class inheriting from MultiTrigger to change it's triggered status for a specified originator.
- bool isModeTriggered(BaseObject* triggerer = NULL); //!< Checks whether the MultiTrigger is triggered concerning it's children.
- bool isTriggered(BaseObject* triggerer = NULL); //!< Get whether the MultiTrigger is triggered for a given object.
+ bool isModeTriggered(BaseObject* triggerer = nullptr); //!< Checks whether the MultiTrigger is triggered concerning it's children.
+ bool isTriggered(BaseObject* triggerer = nullptr); //!< Get whether the MultiTrigger is triggered for a given object.
- virtual void fire(bool status, BaseObject* originator = NULL); //!< Helper method. Creates an Event for the given status and originator and fires it.
+ virtual void fire(bool status, BaseObject* originator = nullptr); //!< Helper method. Creates an Event for the given status and originator and fires it.
void broadcast(bool status); //!< Helper method. Broadcasts an Event for every object that is a target.
void removeTarget(const std::string& target); //!< Remove some target from the MultiTrigger.
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/MultiTriggerContainer.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/MultiTriggerContainer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/MultiTriggerContainer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -49,7 +49,7 @@
@param creator
The creator.
*/
- MultiTriggerContainer::MultiTriggerContainer(Context* context) : BaseObject(context), originator_(NULL), data_(NULL)
+ MultiTriggerContainer::MultiTriggerContainer(Context* context) : BaseObject(context), originator_(nullptr), data_(nullptr)
{
RegisterObject(MultiTriggerContainer);
}
@@ -69,7 +69,7 @@
RegisterObject(MultiTriggerContainer);
Pawn* pawn = orxonox_cast<Pawn*>(data);
- if(pawn != NULL)
+ if(pawn != nullptr)
{
this->setForPlayer(true);
this->setTriggeringPawn(pawn);
Modified: code/branches/cpp11_v2/src/modules/objects/triggers/TriggerBase.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/objects/triggers/TriggerBase.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/objects/triggers/TriggerBase.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -66,7 +66,7 @@
this->bInvertMode_ = false;
this->mode_ = TriggerMode::EventTriggerAND;
- this->parent_ = NULL;
+ this->parent_ = nullptr;
this->bMultiTrigger_ = false;
@@ -169,13 +169,13 @@
@param index
The index.
@return
- Returns a pointer ot the trigger. NULL if no such trigger exists.
+ Returns a pointer ot the trigger. nullptr if no such trigger exists.
*/
const TriggerBase* TriggerBase::getTrigger(unsigned int index) const
{
// If the index is greater than the number of children.
if (this->children_.size() <= index)
- return NULL;
+ return nullptr;
std::set<TriggerBase*>::const_iterator it;
it = this->children_.begin();
Modified: code/branches/cpp11_v2/src/modules/overlays/GUIOverlay.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/overlays/GUIOverlay.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/overlays/GUIOverlay.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -91,7 +91,7 @@
{
ControllableEntity* entity = orxonox_cast<ControllableEntity*>(this->getOwner());
if (entity)
- GUIManager::getInstance().setPlayer(name, entity->getPlayer()); //Set Player is going to be NULL, so it needs to be set in changedVisibility() as well.
+ GUIManager::getInstance().setPlayer(name, entity->getPlayer()); //Set Player is going to be nullptr, so it needs to be set in changedVisibility() as well.
}
}
Modified: code/branches/cpp11_v2/src/modules/overlays/hud/HUDEnemyHealthBar.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/overlays/hud/HUDEnemyHealthBar.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/overlays/hud/HUDEnemyHealthBar.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -61,7 +61,7 @@
void HUDEnemyHealthBar::updateTarget()
{
- Pawn* pawn = NULL;
+ Pawn* pawn = nullptr;
if (this->owner_ && this->useEnemyBar_)
{
// Get the owner's current target (target is usually a Model)
@@ -72,11 +72,11 @@
pawn = orxonox_cast<Pawn*>(target);
// Don't show the HealthBar if the pawn is invisible
if (pawn && !pawn->isVisible())
- pawn = NULL;
+ pawn = nullptr;
}
// Set the pawn as owner of the HealthBar
this->setHealthBarOwner(pawn);
- this->setVisible(pawn != NULL);
+ this->setVisible(pawn != nullptr);
}
void HUDEnemyHealthBar::changedOwner()
Modified: code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -133,7 +133,7 @@
this->fontName_ = font;
for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
{
- if (it->second.text_ != NULL)
+ if (it->second.text_ != nullptr)
it->second.text_->setFontName(this->fontName_);
}
}
@@ -182,7 +182,7 @@
SUPER(HUDNavigation, tick, dt);
Camera* cam = CameraManager::getInstance().getActiveCamera();
- if (cam == NULL)
+ if (cam == nullptr)
return;
const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix();
@@ -475,9 +475,9 @@
/* Pawn* humanPawn = HumanController::getLocalControllerEntityAsPawn();*/
if(!it->second.selected_
|| it->first->getRVVelocity().squaredLength() == 0
- || pawn == NULL
+ || pawn == nullptr
/* TODO : improve getTeam in such a way that it works
- * || humanPawn == NULL
+ * || humanPawn == nullptr
* || pawn->getTeam() == humanPawn->getTeam()*/)
{
// don't show marker for not selected enemies nor if the selected doesn't move
@@ -533,15 +533,15 @@
for (std::map<RadarViewable*, ObjectInfo>::iterator it = this->activeObjectList_.begin(); it != this->activeObjectList_.end(); ++it)
{
- if (it->second.health_ != NULL)
+ if (it->second.health_ != nullptr)
it->second.health_->setDimensions(this->healthMarkerSize_ * xScale, this->healthMarkerSize_ * yScale);
- if (it->second.healthLevel_ != NULL)
+ if (it->second.healthLevel_ != nullptr)
it->second.healthLevel_->setDimensions(this->healthLevelMarkerSize_ * xScale, this->healthLevelMarkerSize_ * yScale);
- if (it->second.panel_ != NULL)
+ if (it->second.panel_ != nullptr)
it->second.panel_->setDimensions(this->navMarkerSize_ * xScale, this->navMarkerSize_ * yScale);
- if (it->second.text_ != NULL)
+ if (it->second.text_ != nullptr)
it->second.text_->setCharHeight(this->textSize_ * yScale);
- if (it->second.target_ != NULL)
+ if (it->second.target_ != nullptr)
it->second.target_->setDimensions(this->aimMarkerSize_ * xScale, this->aimMarkerSize_ * yScale);
}
}
@@ -552,7 +552,7 @@
return;
if (this->activeObjectList_.size() >= this->markerLimit_)
- if (object == NULL)
+ if (object == nullptr)
return;
// Object hasn't been added yet (we know that)
Modified: code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -46,7 +46,7 @@
Constructor.
Registers the object and initializes variables.
*/
- CollectiblePickup::CollectiblePickup() : collection_(NULL)
+ CollectiblePickup::CollectiblePickup() : collection_(nullptr)
{
RegisterObject(CollectiblePickup);
}
@@ -102,6 +102,6 @@
*/
void CollectiblePickup::wasRemovedFromCollection(void)
{
- this->collection_ = NULL;
+ this->collection_ = nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.h
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/CollectiblePickup.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -68,7 +68,7 @@
@return Returns true if the CollectiblePickup is part of a PickupCollection.
*/
bool isInCollection(void) const
- { return this->collection_ != NULL; }
+ { return this->collection_ != nullptr; }
private:
void wasAddedToCollection(PickupCollection* collection);
Modified: code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/PickupCollection.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -147,8 +147,8 @@
// Change the PickupCarrier for all Pickupables this PickupCollection consists of.
for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
{
- if(this->getCarrier() == NULL)
- (*it)->setCarrier(NULL);
+ if(this->getCarrier() == nullptr)
+ (*it)->setCarrier(nullptr);
else
(*it)->setCarrier(this->getCarrier()->getTarget(*it));
}
@@ -226,7 +226,7 @@
*/
bool PickupCollection::addPickupable(CollectiblePickup* pickup)
{
- if(pickup == NULL)
+ if(pickup == nullptr)
return false;
this->pickups_.push_back(pickup);
@@ -246,7 +246,7 @@
const Pickupable* PickupCollection::getPickupable(unsigned int index) const
{
if(this->pickups_.size() >= index)
- return NULL;
+ return nullptr;
std::list<CollectiblePickup*>::const_iterator it = this->pickups_.begin();
std::advance(it, index);
Modified: code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/PickupManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -67,7 +67,7 @@
@brief
Constructor. Registers the PickupManager and creates the default PickupRepresentation.
*/
- PickupManager::PickupManager() : guiLoaded_(false), pickupHighestIndex_(0), defaultRepresentation_(NULL)
+ PickupManager::PickupManager() : guiLoaded_(false), pickupHighestIndex_(0), defaultRepresentation_(nullptr)
{
RegisterObject(PickupManager);
@@ -84,7 +84,7 @@
PickupManager::~PickupManager()
{
// Destroying the default representation.
- if(this->defaultRepresentation_ != NULL)
+ if(this->defaultRepresentation_ != nullptr)
this->defaultRepresentation_->destroy();
this->representations_.clear();
@@ -183,18 +183,18 @@
CollectiblePickup* collectible = orxonox_cast<CollectiblePickup*>(pickup);
// If the Pickupable is part of a PickupCollection it isn't displayed in the PickupInventory, just the PickupCollection is.
- if(collectible != NULL && collectible->isInCollection())
+ if(collectible != nullptr && collectible->isInCollection())
return;
// Getting clientId of the host this change of the pickup's used status concerns.
PickupCarrier* carrier = pickup->getCarrier();
- while(carrier->getCarrierParent() != NULL)
+ while(carrier->getCarrierParent() != nullptr)
carrier = carrier->getCarrierParent();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
return;
PlayerInfo* info = pawn->getPlayer();
- if(info == NULL)
+ if(info == nullptr)
return;
unsigned int clientId = info->getClientID();
@@ -264,18 +264,18 @@
CollectiblePickup* collectible = orxonox_cast<CollectiblePickup*>(pickup);
// If the Pickupable is part of a PickupCollection it isn't displayed in the PickupInventory, just the PickupCollection is.
- if(collectible != NULL && collectible->isInCollection())
+ if(collectible != nullptr && collectible->isInCollection())
return;
// Getting clientId of the host this change of the pickup's pickedUp status concerns.
PickupCarrier* carrier = pickup->getCarrier();
- while(carrier->getCarrierParent() != NULL)
+ while(carrier->getCarrierParent() != nullptr)
carrier = carrier->getCarrierParent();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
return;
PlayerInfo* info = pawn->getFormerPlayer();
- if(info == NULL)
+ if(info == nullptr)
return;
unsigned int clientId = info->getClientID();
@@ -398,7 +398,7 @@
if(this->pickups_.empty())
return;
Pickupable* pickupable = this->pickups_.find(pickup)->second;
- if(pickupable != NULL)
+ if(pickupable != nullptr)
pickupable->drop();
}
// If we're neither server nor standalone we drop the pickup by calling dropPickupNetworked() of the PickupManager on the server.
@@ -441,7 +441,7 @@
if(this->pickups_.empty())
return;
Pickupable* pickupable = this->pickups_.find(pickup)->second;
- if(pickupable != NULL)
+ if(pickupable != nullptr)
pickupable->setUsed(use);
}
// If we're neither server nor standalone we change the used status of the pickup by calling usePickupNetworked() of the PickupManager on the server.
Modified: code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -51,7 +51,7 @@
Constructor. Registers the object and initializes its member variables.
This is primarily for use of the PickupManager in creating a default PickupRepresentation.
*/
- PickupRepresentation::PickupRepresentation() : BaseObject(NULL), Synchronisable(NULL), spawnerRepresentation_(NULL)
+ PickupRepresentation::PickupRepresentation() : BaseObject(nullptr), Synchronisable(nullptr), spawnerRepresentation_(nullptr)
{
RegisterObject(PickupRepresentation);
@@ -63,7 +63,7 @@
@brief
Default Constructor. Registers the object and initializes its member variables.
*/
- PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(NULL)
+ PickupRepresentation::PickupRepresentation(Context* context) : BaseObject(context), Synchronisable(context), spawnerRepresentation_(nullptr)
{
RegisterObject(PickupRepresentation);
@@ -77,7 +77,7 @@
*/
PickupRepresentation::~PickupRepresentation()
{
- if(this->spawnerRepresentation_ != NULL)
+ if(this->spawnerRepresentation_ != nullptr)
this->spawnerRepresentation_->destroy();
if(this->isInitialized())
@@ -134,7 +134,7 @@
*/
StaticEntity* PickupRepresentation::createSpawnerRepresentation(PickupSpawner* spawner)
{
- if(this->spawnerRepresentation_ == NULL)
+ if(this->spawnerRepresentation_ == nullptr)
{
orxout(verbose, context::pickups) << "PickupRepresentation: No spawner representation found." << endl;
if(this->spawnerTemplate_ == "")
@@ -148,7 +148,7 @@
this->spawnerRepresentation_->setVisible(true);
StaticEntity* temp = this->spawnerRepresentation_;
- this->spawnerRepresentation_ = NULL;
+ this->spawnerRepresentation_ = nullptr;
return temp;
}
@@ -163,7 +163,7 @@
void PickupRepresentation::setSpawnerRepresentation(StaticEntity* representation)
{
this->spawnerRepresentation_ = representation;
- if(this->spawnerRepresentation_ != NULL)
+ if(this->spawnerRepresentation_ != nullptr)
this->spawnerRepresentation_->setVisible(false);
}
Modified: code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.h
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/PickupRepresentation.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -118,10 +118,10 @@
/**
@brief Get the StaticEntity that defines how the PickupSpawner of the Pickupable represented by this PickupRepresentation looks like.
@param index The index.
- @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns NULL.
+ @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns nullptr.
*/
inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index) const
- { if(index == 0) return this->spawnerRepresentation_; return NULL; }
+ { if(index == 0) return this->spawnerRepresentation_; return nullptr; }
/**
@brief Get the name of the image representing the pickup in the PickupInventory.
@return Returns the name of the image as a string.
Modified: code/branches/cpp11_v2/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/PickupSpawner.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/PickupSpawner.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -54,7 +54,7 @@
@param creator
Pointer to the object which created this item.
*/
- PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(NULL), representation_(NULL), pickupTemplate_(NULL)
+ PickupSpawner::PickupSpawner(Context* context) : StaticEntity(context), pickup_(nullptr), representation_(nullptr), pickupTemplate_(nullptr)
{
RegisterObject(PickupSpawner);
@@ -73,7 +73,7 @@
this->spawnsRemaining_ = INF;
this->selfDestruct_ = false;
- this->setPickupable(NULL);
+ this->setPickupable(nullptr);
}
/**
@@ -82,7 +82,7 @@
*/
PickupSpawner::~PickupSpawner()
{
- if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != NULL)
+ if(this->isInitialized() && this->selfDestruct_ && this->pickup_ != nullptr)
this->pickup_->destroy();
}
@@ -159,13 +159,13 @@
// Iterate trough all Pawns.
for(ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)
{
- if(spawner == NULL) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
+ if(spawner == nullptr) // Stop if the PickupSpawner has been deleted (e.g. because it has run out of pickups to distribute).
break;
Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
PickupCarrier* carrier = static_cast<PickupCarrier*>(*it);
// If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked.
- if(distance.length() < this->triggerDistance_ && carrier != NULL && this->blocked_.find(carrier) == this->blocked_.end())
+ if(distance.length() < this->triggerDistance_ && carrier != nullptr && this->blocked_.find(carrier) == this->blocked_.end())
{
if(carrier->isTarget(this->pickup_))
this->trigger(*it);
@@ -194,7 +194,7 @@
assert(pickedUp);
pickedUp = false; // To avoid compiler warning.
- this->setPickupable(NULL);
+ this->setPickupable(nullptr);
this->decrementSpawnsRemaining();
}
@@ -281,13 +281,13 @@
if(this->spawnsRemaining_ == 0)
{
orxout(internal_error, context::pickups) << "Massive Error: PickupSpawner still alive until having spawned last item." << endl;
- return NULL;
+ return nullptr;
}
- if (this->pickupTemplate_ != NULL)
+ if (this->pickupTemplate_ != nullptr)
{
Identifier* identifier = this->pickupTemplate_->getBaseclassIdentifier();
- if (identifier != NULL)
+ if (identifier != nullptr)
{
Pickupable* pickup = orxonox_cast<Pickupable*>(identifier->fabricate(this->getContext()));
orxonox_cast<BaseObject*>(pickup)->addTemplate(this->pickupTemplate_);
@@ -297,7 +297,7 @@
orxout(internal_error, context::pickups) << "No base class defined in pickup-template " << this->pickupTemplateName_ << endl;
}
- return NULL;
+ return nullptr;
}
/**
@@ -308,15 +308,15 @@
*/
void PickupSpawner::setPickupable(Pickupable* pickup)
{
- if (this->representation_ != NULL)
+ if (this->representation_ != nullptr)
{
this->representation_->destroy();
- this->representation_ = NULL;
+ this->representation_ = nullptr;
}
- if (pickup != NULL)
+ if (pickup != nullptr)
{
- if (this->pickup_ != NULL)
+ if (this->pickup_ != nullptr)
this->pickup_->destroy();
PickupRepresentation* representation = PickupManager::getInstance().getRepresentation(pickup->getRepresentationName());
Modified: code/branches/cpp11_v2/src/modules/pickup/items/DamageBoostPickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/DamageBoostPickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/DamageBoostPickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -105,7 +105,7 @@
SUPER(DamageBoostPickup, changedUsed);
SpaceShip* ship = this->carrierToSpaceShipHelper();
- if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
+ if(ship == nullptr) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
this->Pickupable::destroy();
@@ -151,14 +151,14 @@
@brief
Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
@return
- A pointer to the SpaceShip, or NULL if the conversion failed.
+ A pointer to the SpaceShip, or nullptr if the conversion failed.
*/
SpaceShip* DamageBoostPickup::carrierToSpaceShipHelper(void)
{
PickupCarrier* carrier = this->getCarrier();
SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
- if(ship == NULL)
+ if(ship == nullptr)
{
orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DamageBoostPickup." << endl;
}
Modified: code/branches/cpp11_v2/src/modules/pickup/items/DronePickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/DronePickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/DronePickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -121,7 +121,7 @@
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
this->Pickupable::destroy();
//Attach to pawn
@@ -130,7 +130,7 @@
Controller* controller = drone->getController();
DroneController* droneController = orxonox_cast<DroneController*>(controller);
- if(droneController != NULL)
+ if(droneController != nullptr)
{
droneController->setOwner(pawn);
}
@@ -155,14 +155,14 @@
@brief
Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
@return
- A pointer to the Pawn, or NULL if the conversion failed.
+ A pointer to the Pawn, or nullptr if the conversion failed.
*/
Pawn* DronePickup::carrierToPawnHelper(void)
{
PickupCarrier* carrier = this->getCarrier();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
{
orxout(internal_error, context::pickups) << "Invalid PickupCarrier in DronePickup." << endl;
}
Modified: code/branches/cpp11_v2/src/modules/pickup/items/HealthPickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/HealthPickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/HealthPickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -113,7 +113,7 @@
if(this->isContinuous() && this->isUsed())
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
this->Pickupable::destroy();
// Calculate the health that is added this tick.
@@ -167,7 +167,7 @@
if(this->isOnce())
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
this->Pickupable::destroy();
float health = 0.0f;
@@ -205,7 +205,7 @@
PickupCarrier* carrier = this->getCarrier();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
{
orxout(internal_error, context::pickups) << "Something went horribly wrong in Health Pickup. PickupCarrier is '" << carrier->getIdentifier()->getName() << "' instead of Pawn." << endl;
this->Pickupable::destroy();
@@ -232,14 +232,14 @@
@brief
Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
@return
- A pointer to the Pawn, or NULL if the conversion failed.
+ A pointer to the Pawn, or nullptr if the conversion failed.
*/
Pawn* HealthPickup::carrierToPawnHelper(void)
{
PickupCarrier* carrier = this->getCarrier();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
orxout(internal_error, context::pickups) << "Invalid PickupCarrier in HealthPickup." << endl;
return pawn;
Modified: code/branches/cpp11_v2/src/modules/pickup/items/InvisiblePickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/InvisiblePickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/InvisiblePickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -138,7 +138,7 @@
bool InvisiblePickup::setInvisible(bool invisibility)
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL)
+ if(pawn == nullptr)
return false;
pawn->setVisible(!invisibility);
@@ -162,14 +162,14 @@
@brief
Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
@return
- A pointer to the Pawn, or NULL if the conversion failed.
+ A pointer to the Pawn, or nullptr if the conversion failed.
*/
Pawn* InvisiblePickup::carrierToPawnHelper(void)
{
PickupCarrier* carrier = this->getCarrier();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
{
orxout(internal_error, context::pickups) << "Invalid PickupCarrier in InvisiblePickup." << endl;
}
Modified: code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/MetaPickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -106,7 +106,7 @@
if(this->isUsed() && this->metaType_ != pickupMetaType::none)
{
PickupCarrier* carrier = this->getCarrier();
- if(this->getMetaType() != pickupMetaType::none && carrier != NULL)
+ if(this->getMetaType() != pickupMetaType::none && carrier != nullptr)
{
// If the metaType is destroyCarrier, then the PickupCarrier is destroyed.
if(this->getMetaType() == pickupMetaType::destroyCarrier)
@@ -120,7 +120,7 @@
for(std::set<Pickupable*>::iterator it = pickups.begin(); it != pickups.end(); it++)
{
Pickupable* pickup = (*it);
- if(pickup == NULL || pickup == this)
+ if(pickup == nullptr || pickup == this)
continue;
// If the metaType is use, then the Pickupable is set to used.
Modified: code/branches/cpp11_v2/src/modules/pickup/items/ShieldPickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/ShieldPickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/ShieldPickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -98,7 +98,7 @@
SUPER(ShieldPickup, changedUsed);
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL)
+ if(pawn == nullptr)
this->Pickupable::destroy();
// If the pickup has transited to used.
@@ -142,14 +142,14 @@
@brief
Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
@return
- A pointer to the Pawn, or NULL if the conversion failed.
+ A pointer to the Pawn, or nullptr if the conversion failed.
*/
Pawn* ShieldPickup::carrierToPawnHelper(void)
{
PickupCarrier* carrier = this->getCarrier();
Pawn* pawn = orxonox_cast<Pawn*>(carrier);
- if(pawn == NULL)
+ if(pawn == nullptr)
{
orxout(internal_error, context::pickups) << "Invalid PickupCarrier in ShieldPickup." << endl;
}
Modified: code/branches/cpp11_v2/src/modules/pickup/items/ShrinkPickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/ShrinkPickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/ShrinkPickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -145,7 +145,7 @@
if(this->isUsed())
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
{
this->Pickupable::destroy();
return;
@@ -172,7 +172,7 @@
{
//TODO: Deploy particle effect.
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
return;
float factor = 1.0f/this->currentFactor_;
@@ -186,7 +186,7 @@
for(int index = 0; index < size; index++)
{
CameraPosition* cameraPos = pawn->getCameraPosition(index);
- if(cameraPos == NULL)
+ if(cameraPos == nullptr)
continue;
cameraPos->setPosition(cameraPos->getPosition()/factor);
}
@@ -200,7 +200,7 @@
{
//TODO: Deploy particle effect.
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
return;
pawn->setScale3D(pawn->getScale3D()*this->shrinkFactor_);
@@ -212,7 +212,7 @@
for(int index = 0; index < size; index++)
{
CameraPosition* cameraPos = pawn->getCameraPosition(index);
- if(cameraPos == NULL)
+ if(cameraPos == nullptr)
continue;
cameraPos->setPosition(cameraPos->getPosition()/this->shrinkFactor_);
}
@@ -236,7 +236,7 @@
if(this->isShrinking_) // If the ship has not reached the target scale, continue shrinking
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
{
this->Pickupable::destroy();
return;
@@ -267,7 +267,7 @@
for(int index = 0; index < size; index++)
{
CameraPosition* cameraPos = pawn->getCameraPosition(index);
- if(cameraPos == NULL)
+ if(cameraPos == nullptr)
continue;
cameraPos->setPosition(cameraPos->getPosition()/factor);
}
@@ -276,7 +276,7 @@
else if(this->isTerminating_) // Grow until the ship reaches its default scale.
{
Pawn* pawn = this->carrierToPawnHelper();
- if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+ if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
this->Pickupable::destroy();
this->timeRemainig_ -= dt;
@@ -308,7 +308,7 @@
for(int index = 0; index < size; index++)
{
CameraPosition* cameraPos = pawn->getCameraPosition(index);
- if(cameraPos == NULL)
+ if(cameraPos == nullptr)
continue;
cameraPos->setPosition(cameraPos->getPosition()/factor);
}
Modified: code/branches/cpp11_v2/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pickup/items/SpeedPickup.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pickup/items/SpeedPickup.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -98,7 +98,7 @@
SUPER(SpeedPickup, changedUsed);
SpaceShip* ship = this->carrierToSpaceShipHelper();
- if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
+ if(ship == nullptr) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed.
this->Pickupable::destroy();
// If the pickup has transited to used.
@@ -142,14 +142,14 @@
@brief
Helper to transform the PickupCarrier to a SpaceShip, and throw an error message if the conversion fails.
@return
- A pointer to the SpaceShip, or NULL if the conversion failed.
+ A pointer to the SpaceShip, or nullptr if the conversion failed.
*/
SpaceShip* SpeedPickup::carrierToSpaceShipHelper(void)
{
PickupCarrier* carrier = this->getCarrier();
SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier);
- if(ship == NULL)
+ if(ship == nullptr)
{
orxout(internal_error, context::pickups) << "Invalid PickupCarrier in SpeedPickup." << endl;
}
Modified: code/branches/cpp11_v2/src/modules/pong/Pong.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pong/Pong.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pong/Pong.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -102,7 +102,7 @@
*/
void Pong::cleanup()
{
- if (this->ball_ != NULL) // Destroy the ball, if present.
+ if (this->ball_ != nullptr) // Destroy the ball, if present.
{
this->ball_->destroy();
this->ball_ = 0;
@@ -111,7 +111,7 @@
// Destroy both bats, if present.
for (size_t i = 0; i < 2; ++i)
{
- if (this->bat_[0] != NULL)
+ if (this->bat_[0] != nullptr)
{
this->bat_[0]->destroy();
this->bat_[0] = 0;
@@ -126,9 +126,9 @@
*/
void Pong::start()
{
- if (this->center_ != NULL) // There needs to be a PongCenterpoint, i.e. the area the game takes place.
+ if (this->center_ != nullptr) // There needs to be a PongCenterpoint, i.e. the area the game takes place.
{
- if (this->ball_ == NULL) // If there is no ball, create a new ball.
+ if (this->ball_ == nullptr) // If there is no ball, create a new ball.
{
this->ball_ = new PongBall(this->center_->getContext());
// Apply the template for the ball specified by the centerpoint.
@@ -146,7 +146,7 @@
// If one of the bats is missing, create it. Apply the template for the bats as specified in the centerpoint.
for (size_t i = 0; i < 2; ++i)
{
- if (this->bat_[i] == NULL)
+ if (this->bat_[i] == nullptr)
{
this->bat_[i] = new PongBat(this->center_->getContext());
this->bat_[i]->addTemplate(this->center_->getBattemplate());
@@ -230,13 +230,13 @@
assert(player);
// If the first (left) bat has no player.
- if (this->bat_[0]->getPlayer() == NULL)
+ if (this->bat_[0]->getPlayer() == nullptr)
{
player->startControl(this->bat_[0]);
this->players_[player].state_ = PlayerState::Alive;
}
// If the second (right) bat has no player.
- else if (this->bat_[1]->getPlayer() == NULL)
+ else if (this->bat_[1]->getPlayer() == nullptr)
{
player->startControl(this->bat_[1]);
this->players_[player].state_ = PlayerState::Alive;
@@ -246,7 +246,7 @@
return;
// If the player is an AI, it receives a pointer to the ball.
- if (player->getController() != NULL && player->getController()->isA(Class(PongAI)))
+ if (player->getController() != nullptr && player->getController()->isA(Class(PongAI)))
{
PongAI* ai = orxonox_cast<PongAI*>(player->getController());
ai->setPongBall(this->ball_);
@@ -261,7 +261,7 @@
{
Deathmatch::playerScored(player, score);
- if (this->center_ != NULL) // If there is a centerpoint.
+ if (this->center_ != nullptr) // If there is a centerpoint.
{
// Fire an event for the player that has scored, to be able to react to it in the level, e.g. by displaying fireworks.
if (player == this->getRightPlayer())
@@ -270,12 +270,12 @@
this->center_->fireEvent(FireEventName(PongCenterpoint, left));
// Also announce, that the player has scored.
- if (player != NULL)
+ if (player != nullptr)
this->gtinfo_->sendAnnounceMessage(player->getName() + " scored");
}
// If there is a ball present, reset its position, velocity and acceleration.
- if (this->ball_ != NULL)
+ if (this->ball_ != nullptr)
{
this->ball_->setPosition(Vector3::ZERO);
this->ball_->setVelocity(Vector3::ZERO);
@@ -284,14 +284,14 @@
}
// If there are bats reset them to the middle position.
- if (this->bat_[0] != NULL && this->bat_[1] != NULL)
+ if (this->bat_[0] != nullptr && this->bat_[1] != nullptr)
{
this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
}
// If a player gets enough points, he won the game -> end of game
- PlayerInfo* winningPlayer = NULL;
+ PlayerInfo* winningPlayer = nullptr;
if (this->getLeftPlayer() && this->getScore(this->getLeftPlayer()) >= scoreLimit_)
winningPlayer = this->getLeftPlayer();
else if (this->getRightPlayer() && this->getScore(this->getRightPlayer()) >= scoreLimit_)
@@ -313,7 +313,7 @@
*/
void Pong::startBall()
{
- if (this->ball_ != NULL && this->center_ != NULL)
+ if (this->ball_ != nullptr && this->center_ != nullptr)
this->ball_->setSpeed(this->center_->getBallSpeed());
}
@@ -321,11 +321,11 @@
@brief
Get the left player.
@return
- Returns a pointer to the player playing on the left. If there is no left player, NULL is returned.
+ Returns a pointer to the player playing on the left. If there is no left player, nullptr is returned.
*/
PlayerInfo* Pong::getLeftPlayer() const
{
- if (this->bat_ != NULL && this->bat_[0] != NULL)
+ if (this->bat_ != nullptr && this->bat_[0] != nullptr)
return this->bat_[0]->getPlayer();
else
return 0;
@@ -335,11 +335,11 @@
@brief
Get the right player.
@return
- Returns a pointer to the player playing on the right. If there is no right player, NULL is returned.
+ Returns a pointer to the player playing on the right. If there is no right player, nullptr is returned.
*/
PlayerInfo* Pong::getRightPlayer() const
{
- if (this->bat_ != NULL && this->bat_[1] != NULL)
+ if (this->bat_ != nullptr && this->bat_[1] != nullptr)
return this->bat_[1]->getPlayer();
else
return 0;
Modified: code/branches/cpp11_v2/src/modules/pong/PongAI.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pong/PongAI.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pong/PongAI.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -100,7 +100,7 @@
void PongAI::tick(float dt)
{
// If either the ball, or the controllable entity (i.e. the bat) don't exist (or aren't set).
- if (this->ball_ == NULL || this->getControllableEntity() == NULL)
+ if (this->ball_ == nullptr || this->getControllableEntity() == nullptr)
return;
Vector3 mypos = this->getControllableEntity()->getPosition();
Modified: code/branches/cpp11_v2/src/modules/pong/PongBall.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pong/PongBall.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pong/PongBall.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -162,10 +162,10 @@
{
float distance = 0;
- if (this->bat_ != NULL) // If there are bats.
+ if (this->bat_ != nullptr) // If there are bats.
{
// If the right boundary has been crossed.
- if (position.x > this->fieldWidth_ / 2 && this->bat_[1] != NULL)
+ if (position.x > this->fieldWidth_ / 2 && this->bat_[1] != nullptr)
{
// Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
@@ -194,7 +194,7 @@
}
}
// If the left boundary has been crossed.
- else if (position.x < -this->fieldWidth_ / 2 && this->bat_[0] != NULL)
+ else if (position.x < -this->fieldWidth_ / 2 && this->bat_[0] != nullptr)
{
// Calculate the distance (in z-direction) between the ball and the center of the bat, weighted by half of the effective length of the bat (with additional 10%)
distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
@@ -284,7 +284,7 @@
void PongBall::applyBats()
{
// Make space for the bats, if they don't exist, yet.
- if (this->bat_ == NULL)
+ if (this->bat_ == nullptr)
{
this->bat_ = new WeakPtr<PongBat>[2];
this->bDeleteBats_ = true;
Modified: code/branches/cpp11_v2/src/modules/pong/PongCenterpoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pong/PongCenterpoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pong/PongCenterpoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -83,7 +83,7 @@
*/
void PongCenterpoint::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(Pong)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Pong)))
{
Pong* pongGametype = orxonox_cast<Pong*>(this->getGametype());
pongGametype->setCenterpoint(this);
Modified: code/branches/cpp11_v2/src/modules/pong/PongScore.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/pong/PongScore.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/pong/PongScore.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -96,7 +96,7 @@
SUPER(PongScore, tick, dt);
// If the owner is set. The owner being a Pong game.
- if (this->owner_ != NULL)
+ if (this->owner_ != nullptr)
{
if (!this->owner_->hasEnded())
{
@@ -112,12 +112,12 @@
std::string score2("0");
// Save the name and score of each player as a string.
- if (player1_ != NULL)
+ if (player1_ != nullptr)
{
name1 = player1_->getName();
score1 = multi_cast<std::string>(this->owner_->getScore(player1_));
}
- if (player2_ != NULL)
+ if (player2_ != nullptr)
{
name2 = player2_->getName();
score2 = multi_cast<std::string>(this->owner_->getScore(player2_));
@@ -127,7 +127,7 @@
std::string output1;
if (this->bShowLeftPlayer_)
{
- if (this->bShowName_ && this->bShowScore_ && player1_ != NULL)
+ if (this->bShowName_ && this->bShowScore_ && player1_ != nullptr)
output1 = name1 + " - " + score1;
else if (this->bShowScore_)
output1 = score1;
@@ -138,7 +138,7 @@
std::string output2;
if (this->bShowRightPlayer_)
{
- if (this->bShowName_ && this->bShowScore_ && player2_ != NULL)
+ if (this->bShowName_ && this->bShowScore_ && player2_ != nullptr)
output2 = score2 + " - " + name2;
else if (this->bShowScore_)
output2 = score2;
@@ -162,13 +162,13 @@
/**
@brief
Is called when the owner changes.
- Sets the owner to NULL, if it is not a pointer to a Pong game.
+ Sets the owner to nullptr, if it is not a pointer to a Pong game.
*/
void PongScore::changedOwner()
{
SUPER(PongScore, changedOwner);
- if (this->getOwner() != NULL && this->getOwner()->getGametype())
+ if (this->getOwner() != nullptr && this->getOwner()->getGametype())
this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype());
else
this->owner_ = 0;
Modified: code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/portals/PortalEndPoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -47,7 +47,7 @@
std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
- PortalEndPoint::PortalEndPoint(Context* context) : StaticEntity(context), RadarViewable(this, static_cast<WorldEntity*>(this)), id_(0), trigger_(NULL), reenterDelay_(0)
+ PortalEndPoint::PortalEndPoint(Context* context) : StaticEntity(context), RadarViewable(this, static_cast<WorldEntity*>(this)), id_(0), trigger_(nullptr), reenterDelay_(0)
{
RegisterObject(PortalEndPoint);
@@ -69,7 +69,7 @@
PortalEndPoint::~PortalEndPoint()
{
- if(this->isInitialized() && this->trigger_ != NULL)
+ if(this->isInitialized() && this->trigger_ != nullptr)
delete this->trigger_;
}
Modified: code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/GlobalQuest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -137,7 +137,7 @@
*/
bool GlobalQuest::isStartable(const PlayerInfo* player) const
{
- if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
+ if(!(this->getParentQuest() == nullptr || this->getParentQuest()->isActive(player)))
return false;
return (this->isInactive(player) && !(this->status_ == QuestStatus::Completed || this->status_ == QuestStatus::Failed));
@@ -197,7 +197,7 @@
@param status
The status to be set.
@return
- Returns false if player is NULL.
+ Returns false if player is nullptr.
*/
bool GlobalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
{
@@ -248,7 +248,7 @@
i--;
}
- return NULL;
+ return nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/LocalQuest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -127,7 +127,7 @@
*/
bool LocalQuest::isStartable(const PlayerInfo* player) const
{
- if(!(this->getParentQuest() == NULL || this->getParentQuest()->isActive(player)))
+ if(!(this->getParentQuest() == nullptr || this->getParentQuest()->isActive(player)))
return false;
return this->isInactive(player);
@@ -187,7 +187,7 @@
@param status
The status to be set.
@return
- Returns false if player is NULL.
+ Returns false if player is nullptr.
*/
bool LocalQuest::setStatus(PlayerInfo* player, const QuestStatus::Value & status)
{
Modified: code/branches/cpp11_v2/src/modules/questsystem/Quest.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/Quest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/Quest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -54,7 +54,7 @@
{
RegisterObject(Quest);
- this->parentQuest_ = NULL;
+ this->parentQuest_ = nullptr;
}
/**
@@ -182,7 +182,7 @@
@param index
The index.
@return
- Returns a pointer to the sub-quest at the given index. NULL if there is no element at the given index.
+ Returns a pointer to the sub-quest at the given index. nullptr if there is no element at the given index.
*/
const Quest* Quest::getSubQuest(unsigned int index) const
{
@@ -197,7 +197,7 @@
i--;
}
- return NULL; // If the index is greater than the number of elements in the list.
+ return nullptr; // If the index is greater than the number of elements in the list.
}
/**
@@ -206,7 +206,7 @@
@param index
The index.
@return
- Returns a pointer to the QuestHint at the given index. NULL if there is no element at the given index.
+ Returns a pointer to the QuestHint at the given index. nullptr if there is no element at the given index.
*/
const QuestHint* Quest::getHint(unsigned int index) const
{
@@ -220,7 +220,7 @@
i--;
}
- return NULL; // If the index is greater than the number of elements in the list.
+ return nullptr; // If the index is greater than the number of elements in the list.
}
/**
@@ -229,7 +229,7 @@
@param index
The index.
@return
- Returns a pointer to the fail QuestEffect at the given index. NULL if there is no element at the given index.
+ Returns a pointer to the fail QuestEffect at the given index. nullptr if there is no element at the given index.
*/
const QuestEffect* Quest::getFailEffect(unsigned int index) const
{
@@ -243,7 +243,7 @@
i--;
}
- return NULL; // If the index is greater than the number of elements in the list.
+ return nullptr; // If the index is greater than the number of elements in the list.
}
/**
@@ -252,7 +252,7 @@
@param index
The index.
@return
- Returns a pointer to the complete QuestEffect at the given index. NULL if there is no element at the given index.
+ Returns a pointer to the complete QuestEffect at the given index. nullptr if there is no element at the given index.
*/
const QuestEffect* Quest::getCompleteEffect(unsigned int index) const
{
@@ -266,7 +266,7 @@
i--;
}
- return NULL; // If the index is greater than the number of elements in the list.
+ return nullptr; // If the index is greater than the number of elements in the list.
}
/**
@@ -279,7 +279,7 @@
*/
bool Quest::isInactive(const PlayerInfo* player) const
{
- if(player == NULL)
+ if(player == nullptr)
return true;
return this->getStatus(player) == QuestStatus::Inactive;
}
@@ -294,7 +294,7 @@
*/
bool Quest::isActive(const PlayerInfo* player) const
{
- if(player == NULL)
+ if(player == nullptr)
return false;
return this->getStatus(player) == QuestStatus::Active;
}
@@ -309,7 +309,7 @@
*/
bool Quest::isFailed(const PlayerInfo* player) const
{
- if(player == NULL)
+ if(player == nullptr)
return false;
return this->getStatus(player) == QuestStatus::Failed;
}
@@ -324,7 +324,7 @@
*/
bool Quest::isCompleted(const PlayerInfo* player) const
{
- if(player == NULL)
+ if(player == nullptr)
return false;
return this->getStatus(player) == QuestStatus::Completed;
}
Modified: code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/QuestEffectBeacon.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -112,10 +112,10 @@
}
PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
- PlayerInfo* player = NULL;
+ PlayerInfo* player = nullptr;
// If the trigger is a PlayerTrigger.
- if(pTrigger != NULL)
+ if(pTrigger != nullptr)
{
if(!pTrigger->isForPlayer()) // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
return false;
@@ -125,7 +125,7 @@
else
return false;
- if(player == NULL)
+ if(player == nullptr)
{
orxout(verbose, context::quests) << "The QuestEffectBeacon was triggered by an entity other than a Pawn. (" << trigger->getIdentifier()->getName() << ")" << endl;
return false;
@@ -242,7 +242,7 @@
i--;
}
- return NULL;
+ return nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/questsystem/QuestHint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/QuestHint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/QuestHint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -87,7 +87,7 @@
*/
bool QuestHint::isActive(const PlayerInfo* player) const
{
- if(player == NULL) // If the player is NULL, the Quest obviously can't be active.
+ if(player == nullptr) // If the player is nullptr, the Quest obviously can't be active.
return false;
// Find the player.
Modified: code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/QuestListener.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -58,7 +58,7 @@
RegisterObject(QuestListener);
this->mode_ = QuestListenerMode::All;
- this->quest_ = NULL;
+ this->quest_ = nullptr;
}
/**
@@ -80,7 +80,7 @@
XMLPortParam(QuestListener, "questId", setQuestId, getQuestId, xmlelement, mode);
XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
- if(this->quest_ != NULL)
+ if(this->quest_ != nullptr)
this->quest_->addListener(this); // Adds the QuestListener to the Quests list of listeners.
orxout(verbose, context::quests) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << endl;
@@ -116,7 +116,7 @@
{
this->quest_ = QuestManager::getInstance().findQuest(id); // Find the Quest corresponding to the given questId.
- if(this->quest_ == NULL) // If there is no such Quest.
+ if(this->quest_ == nullptr) // If there is no such Quest.
{
ThrowException(Argument, "This is bad! The QuestListener has not found a Quest with a corresponding id..");
return false;
Modified: code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/QuestManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -92,9 +92,9 @@
*/
bool QuestManager::registerQuest(Quest* quest)
{
- if(quest == NULL)
+ if(quest == nullptr)
{
- orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;
+ orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl;
return false;
}
@@ -134,9 +134,9 @@
*/
bool QuestManager::registerHint(QuestHint* hint)
{
- if(hint == NULL)
+ if(hint == nullptr)
{
- orxout(internal_error, context::quests) << "Quest pointer is NULL." << endl;
+ orxout(internal_error, context::quests) << "Quest pointer is nullptr." << endl;
return false;
}
@@ -172,7 +172,7 @@
The id of the Quest sought for.
@return
Returns a pointer to the Quest with the input id.
- Returns NULL if there is no Quest with the given questId.
+ Returns nullptr if there is no Quest with the given questId.
@throws
Throws an exception if the given questId is invalid.
*/
@@ -187,7 +187,7 @@
quest = it->second;
else
{
- quest = NULL;
+ quest = nullptr;
orxout(internal_warning, context::quests) << "The quest with id {" << questId << "} is nowhere to be found." << endl;
}
@@ -201,7 +201,7 @@
The id of the QuestHint sought for.
@return
Returns a pointer to the QuestHint with the input id.
- Returns NULL if there is no QuestHint with the given hintId.
+ Returns nullptr if there is no QuestHint with the given hintId.
@throws
Throws an exception if the given hintId is invalid.
*/
@@ -216,7 +216,7 @@
hint = it->second;
else
{
- hint = NULL;
+ hint = nullptr;
orxout(internal_warning, context::quests) << "The hint with id {" << hintId << "} is nowhere to be found." << endl;
}
@@ -236,7 +236,7 @@
int numQuests = 0;
for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
{
- if(it->second->getParentQuest() == NULL && !it->second->isInactive(player))
+ if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player))
numQuests++;
}
return numQuests;
@@ -256,10 +256,10 @@
{
for(std::map<std::string, Quest*>::iterator it = this->questMap_.begin(); it != this->questMap_.end(); it++)
{
- if(it->second->getParentQuest() == NULL && !it->second->isInactive(player) && index-- == 0)
+ if(it->second->getParentQuest() == nullptr && !it->second->isInactive(player) && index-- == 0)
return it->second;
}
- return NULL;
+ return nullptr;
}
/**
@@ -274,7 +274,7 @@
*/
int QuestManager::getNumSubQuests(Quest* quest, PlayerInfo* player)
{
- if(quest == NULL)
+ if(quest == nullptr)
return this->getNumRootQuests(player);
std::list<Quest*> quests = quest->getSubQuestList();
@@ -299,7 +299,7 @@
*/
Quest* QuestManager::getSubQuest(Quest* quest, PlayerInfo* player, int index)
{
- if(quest == NULL)
+ if(quest == nullptr)
return this->getRootQuest(player, index);
std::list<Quest*> quests = quest->getSubQuestList();
@@ -308,7 +308,7 @@
if(!(*it)->isInactive(player) && index-- == 0)
return *it;
}
- return NULL;
+ return nullptr;
}
/**
@@ -353,7 +353,7 @@
if((*it)->isActive(player) && index-- == 0)
return *it;
}
- return NULL;
+ return nullptr;
}
/**
@@ -366,7 +366,7 @@
*/
Quest* QuestManager::getParentQuest(Quest* quest)
{
- OrxAssert(quest, "The input Quest is NULL.");
+ OrxAssert(quest, "The input Quest is nullptr.");
return quest->getParentQuest();
}
@@ -380,7 +380,7 @@
*/
QuestDescription* QuestManager::getDescription(Quest* item)
{
- OrxAssert(item, "The input Quest is NULL.");
+ OrxAssert(item, "The input Quest is nullptr.");
return item->getDescription();
}
@@ -394,7 +394,7 @@
*/
QuestDescription* QuestManager::getDescription(QuestHint* item)
{
- OrxAssert(item, "The input QuestHint is NULL.");
+ OrxAssert(item, "The input QuestHint is nullptr.");
return item->getDescription();
}
@@ -408,7 +408,7 @@
*/
const std::string QuestManager::getId(Quest* item) const
{
- OrxAssert(item, "The input Quest is NULL.");
+ OrxAssert(item, "The input Quest is nullptr.");
return item->getId();
}
@@ -422,7 +422,7 @@
*/
const std::string QuestManager::getId(QuestHint* item) const
{
- OrxAssert(item, "The input QuestHint is NULL.");
+ OrxAssert(item, "The input QuestHint is nullptr.");
return item->getId();
}
@@ -439,10 +439,10 @@
PlayerInfo* QuestManager::retrievePlayer(const std::string & guiName)
{
PlayerInfo* player = GUIManager::getInstance().getPlayer(guiName);
- if(player == NULL)
+ if(player == nullptr)
{
orxout(internal_error, context::quests) << "GUIOverlay with name '" << guiName << "' has no player." << endl;
- return NULL;
+ return nullptr;
}
return player;
Modified: code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuest.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -89,7 +89,7 @@
try
{
Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId());
- if(quest == NULL || !quest->start(player))
+ if(quest == nullptr || !quest->start(player))
return false;
}
catch(const orxonox::Exception& ex)
Modified: code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuestHint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuestHint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/effects/AddQuestHint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -112,7 +112,7 @@
try
{
QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_);
- if(hint == NULL || !hint->setActive(player))
+ if(hint == nullptr || !hint->setActive(player))
return false;
}
catch(const Exception& e)
Modified: code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/effects/AddReward.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -89,7 +89,7 @@
return *reward;
i--;
}
- return NULL;
+ return nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/modules/questsystem/effects/CompleteQuest.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/effects/CompleteQuest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/effects/CompleteQuest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -91,7 +91,7 @@
try
{
quest = QuestManager::getInstance().findQuest(this->getQuestId());
- if(quest == NULL || !quest->complete(player))
+ if(quest == nullptr || !quest->complete(player))
return false;
}
catch(const Exception& e)
Modified: code/branches/cpp11_v2/src/modules/questsystem/effects/FailQuest.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/questsystem/effects/FailQuest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/questsystem/effects/FailQuest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -90,7 +90,7 @@
try
{
quest = QuestManager::getInstance().findQuest(this->getQuestId());
- if(quest == NULL || !quest->fail(player))
+ if(quest == nullptr || !quest->fail(player))
return false;
}
catch(const Exception& e)
Modified: code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/tetris/Tetris.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/tetris/Tetris.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,7 +71,7 @@
this->starttimer_.setTimer(1.0, false, createExecutor(createFunctor(&Tetris::startBrick, this)));
this->starttimer_.stopTimer();
- this->player_ = NULL;
+ this->player_ = nullptr;
this->setHUDTemplate("TetrisHUD");
this->futureBrick_ = 0;
}
@@ -112,7 +112,7 @@
{
SUPER(Tetris, tick, dt);
- if((this->activeBrick_ != NULL)&&(!this->hasEnded()))
+ if((this->activeBrick_ != nullptr)&&(!this->hasEnded()))
{
if(!this->isValidBrickPosition(this->activeBrick_))
{
@@ -289,7 +289,7 @@
*/
void Tetris::start()
{
- if (this->center_ != NULL) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
+ if (this->center_ != nullptr) // There needs to be a TetrisCenterpoint, i.e. the area the game takes place.
{
// Create the first brick.
this->createBrick();
@@ -322,7 +322,7 @@
void Tetris::end()
{
this->activeBrick_->setVelocity(Vector3::ZERO);
- if(this->activeBrick_ != NULL)
+ if(this->activeBrick_ != nullptr)
{
this->player_->stopControl();
}
@@ -350,7 +350,7 @@
bool left = Gametype::playerLeft(player);
if(player && player->isHumanPlayer())
{
- if(this->activeBrick_ != NULL)
+ if(this->activeBrick_ != nullptr)
{
this->player_->stopControl();
}
@@ -369,7 +369,7 @@
{
assert(player);
- if(this->player_ == NULL)
+ if(this->player_ == nullptr)
{
this->player_ = player;
this->players_[player].state_ = PlayerState::Alive;
@@ -380,11 +380,11 @@
void Tetris::startBrick(void)
{
- if(this->player_ == NULL)
+ if(this->player_ == nullptr)
return;
unsigned int cameraIndex = 0;
- if(this->activeBrick_ != NULL)
+ if(this->activeBrick_ != nullptr)
{
// Get camera settings
cameraIndex = this->activeBrick_->getCurrentCameraIndex();
@@ -436,7 +436,7 @@
@brief
Get the player.
@return
- Returns a pointer to the player. If there is no player, NULL is returned.
+ Returns a pointer to the player. If there is no player, nullptr is returned.
*/
PlayerInfo* Tetris::getPlayer(void) const
{
Modified: code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/tetris/TetrisBrick.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -80,16 +80,16 @@
this->brickStones_.push_back(stone);
this->attach(stone);
this->formBrick(stone, i);
- if(this->tetris_ != NULL)
+ if(this->tetris_ != nullptr)
{
stone->setGame(this->tetris_);
- if(this->tetris_->getCenterpoint() != NULL)
+ if(this->tetris_->getCenterpoint() != nullptr)
stone->addTemplate(this->tetris_->getCenterpoint()->getStoneTemplate());
else
- orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
+ orxout()<< "tetris_->getCenterpoint == nullptr in TetrisBrick.cc"<< endl;
}
else
- orxout()<< "tetris_ == NULL in TetrisBrick.cc"<< endl;
+ orxout()<< "tetris_ == nullptr in TetrisBrick.cc"<< endl;
}
}
@@ -160,18 +160,18 @@
{
if(i < this->brickStones_.size())
return this->brickStones_[i];
- else return NULL;
+ else return nullptr;
}
Tetris* TetrisBrick::getTetris()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
{
Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
return tetrisGametype;
}
- return NULL;
+ return nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/modules/tetris/TetrisCenterpoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/tetris/TetrisCenterpoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/tetris/TetrisCenterpoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -83,7 +83,7 @@
*/
void TetrisCenterpoint::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(Tetris)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(Tetris)))
{
Tetris* tetrisGametype = orxonox_cast<Tetris*>(this->getGametype());
tetrisGametype->setCenterpoint(this);
Modified: code/branches/cpp11_v2/src/modules/tetris/TetrisScore.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/tetris/TetrisScore.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/tetris/TetrisScore.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -56,7 +56,7 @@
RegisterObject(TetrisScore);
this->owner_ = 0;
- this->player_ = NULL;
+ this->player_ = nullptr;
}
/**
@@ -88,7 +88,7 @@
SUPER(TetrisScore, tick, dt);
// If the owner is set. The owner being a Tetris game.
- if (this->owner_ != NULL)
+ if (this->owner_ != nullptr)
{
std::string score("0");
if(!this->owner_->hasEnded())
@@ -100,7 +100,7 @@
if(this->owner_->hasStarted())
{
// Save the name and score of each player as a string.
- if (player_ != NULL)
+ if (player_ != nullptr)
score = multi_cast<std::string>(this->owner_->getScore(player_));
}
this->setCaption(score);
@@ -110,13 +110,13 @@
/**
@brief
Is called when the owner changes.
- Sets the owner to NULL, if it is not a pointer to a Tetris game.
+ Sets the owner to nullptr, if it is not a pointer to a Tetris game.
*/
void TetrisScore::changedOwner()
{
SUPER(TetrisScore, changedOwner);
- if (this->getOwner() != NULL && this->getOwner()->getGametype())
+ if (this->getOwner() != nullptr && this->getOwner()->getGametype())
this->owner_ = orxonox_cast<Tetris*>(this->getOwner()->getGametype());
else
this->owner_ = 0;
Modified: code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -89,8 +89,8 @@
{
RegisterObject(TowerDefense);
- selecter = NULL;
- this->player_ = NULL;
+ selecter = nullptr;
+ this->player_ = nullptr;
this->setHUDTemplate("TowerDefenseHUD");
this->waveNumber_ = 0;
this->timeSinceLastSpawn_ = 0.0;
@@ -116,9 +116,9 @@
void TowerDefense::start()
{
- if (center_ != NULL) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
+ if (center_ != nullptr) // There needs to be a TowerDefenseCenterpoint, i.e. the area the game takes place.
{
- if (selecter == NULL)
+ if (selecter == nullptr)
{
selecter = new TowerDefenseSelecter(this->center_->getContext());
}
@@ -175,7 +175,7 @@
WaypointController* controller = (WaypointController*)(en1->getXMLController());
- if (controller != NULL && waypoints_.size() > 1)
+ if (controller != nullptr && waypoints_.size() > 1)
{
en1->setPosition(waypoints_.at(0)->getPosition() + offset_);
en1->setOrientation(Vector3(0,0,10), Degree(0));
@@ -207,7 +207,7 @@
assert(player);
player_ = player;
- if (selecter->getPlayer() == NULL)
+ if (selecter->getPlayer() == nullptr)
{
player_->startControl(selecter);
players_[player].state_ = PlayerState::Alive;
@@ -218,7 +218,7 @@
@brief
Get the player.
@return
- Returns a pointer to the player. If there is no player, NULL is returned.
+ Returns a pointer to the player. If there is no player, nullptr is returned.
*/
PlayerInfo* TowerDefense::getPlayer(void) const
{
@@ -264,7 +264,7 @@
{
SUPER(TowerDefense, tick, dt);
- if (hasStarted() == false || player_ == NULL)
+ if (hasStarted() == false || player_ == nullptr)
{
return;
}
@@ -272,7 +272,7 @@
timeSinceLastSpawn_ += dt;
//build/upgrade tower at selecter position
- if (selecter != NULL && selecter->buildTower_ == true)
+ if (selecter != nullptr && selecter->buildTower_ == true)
{
selecter->buildTower_ = false;
@@ -288,7 +288,7 @@
for (std::list<WeakPtr<TowerDefenseEnemy> >::iterator it = enemies_.begin(); it != enemies_.end(); )
{
- if (*it == NULL)
+ if (*it == nullptr)
{
// the enemy was destroyed by a tower - remove it from the list
enemies_.erase(it++);
@@ -364,7 +364,7 @@
//Place waypoints along the street for the waypoint controllers of the enemies
TDCoordinate* thisCoord = &startCoord;
TDCoordinate* nextCoord;
- while ((nextCoord = getNextStreetCoord(thisCoord)) != NULL)
+ while ((nextCoord = getNextStreetCoord(thisCoord)) != nullptr)
{
waypoints_.push_back(fields_[nextCoord->GetX()][nextCoord->GetY()]);
thisCoord = nextCoord;
@@ -380,7 +380,7 @@
if (thisField->getType() != STREET && thisField->getType() != START)
{
- return NULL;
+ return nullptr;
}
if (thisField->getAngle() == 0)
@@ -405,6 +405,6 @@
return nextCoord;
}
- return NULL;
+ return nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseCenterpoint.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseCenterpoint.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseCenterpoint.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -91,7 +91,7 @@
*/
void TowerDefenseCenterpoint::checkGametype()
{
- if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense)))
+ if (this->getGametype() != nullptr && this->getGametype()->isA(Class(TowerDefense)))
{
// Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point
TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype());
Modified: code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseEnemy.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseEnemy.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -46,7 +46,7 @@
WeakPtr<TowerDefense> TowerDefenseEnemy::getGame()
{
- if (game == NULL)
+ if (game == nullptr)
{
for (ObjectList<TowerDefense>::iterator it = ObjectList<TowerDefense>::begin(); it != ObjectList<TowerDefense>::end(); ++it)
game = *it;
Modified: code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseField.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseField.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseField.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -48,9 +48,9 @@
{
RegisterObject(TowerDefenseField);
- tower_ = NULL;
+ tower_ = nullptr;
type_ = FREE;
- center_ = NULL;
+ center_ = nullptr;
upgrade_ = 0;
setPosition(0,0,0);
modelGround_ = new Model(getContext());
@@ -118,7 +118,7 @@
bool TowerDefenseField::canUpgrade()
{
- if (tower_ != NULL && upgrade_ < 5)
+ if (tower_ != nullptr && upgrade_ < 5)
{
return true;
}
@@ -128,7 +128,7 @@
void TowerDefenseField::setAngle(int newAngle)
{
- if (modelGround_ != NULL)
+ if (modelGround_ != nullptr)
{
switch (newAngle)
{
@@ -151,7 +151,7 @@
}
}
- if (modelObject_ != NULL)
+ if (modelObject_ != nullptr)
{
switch (newAngle)
{
@@ -184,7 +184,7 @@
void TowerDefenseField::createFree(int orientation)
{
modelGround_->setMeshSource("TD_F1.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = FREE;
setUpgrade(0);
setAngle(orientation);
@@ -193,7 +193,7 @@
void TowerDefenseField::createStart(int orientation)
{
modelGround_->setMeshSource("TD_S5.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = START;
setUpgrade(0);
setAngle(orientation);
@@ -203,7 +203,7 @@
void TowerDefenseField::createEnd(int orientation)
{
modelGround_->setMeshSource("TD_S4.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = END;
setUpgrade(0);
setAngle(orientation);
@@ -212,7 +212,7 @@
void TowerDefenseField::createStraight(int orientation)
{
modelGround_->setMeshSource("TD_S1.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = STREET;
setUpgrade(0);
setAngle(orientation);
@@ -221,7 +221,7 @@
void TowerDefenseField::createRCurve(int orientation)
{
modelGround_->setMeshSource("TD_S2.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = STREET;
setUpgrade(0);
setAngle(orientation);
@@ -230,7 +230,7 @@
void TowerDefenseField::createLCurve(int orientation)
{
modelGround_->setMeshSource("TD_S3.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = STREET;
setUpgrade(0);
setAngle(orientation);
@@ -240,7 +240,7 @@
{
modelGround_->setMeshSource("TD_F1.mesh");
modelObject_->setMeshSource("TD_O1.mesh");
- tower_ = NULL;
+ tower_ = nullptr;
type_ = OBSTACLE;
setUpgrade(0);
setAngle(orientation);
@@ -248,14 +248,14 @@
void TowerDefenseField::createTower(int upgrade)
{
- if (tower_ == NULL)
+ if (tower_ == nullptr)
{
modelGround_->setMeshSource("TD_F1.mesh");
tower_ = new TowerDefenseTower(center_->getContext());
attach(tower_);
type_ = TOWER;
setUpgrade(upgrade);
- if (upgrade_ > 0 && modelObject_ != NULL)
+ if (upgrade_ > 0 && modelObject_ != nullptr)
{
switch (upgrade_)
{
@@ -286,10 +286,10 @@
void TowerDefenseField::destroyTower()
{
- if (tower_ != NULL)
+ if (tower_ != nullptr)
{
tower_->destroy();
- tower_ = NULL;
+ tower_ = nullptr;
}
}
Modified: code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseTower.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/towerdefense/TowerDefenseTower.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -24,7 +24,7 @@
TowerDefenseTower::TowerDefenseTower(Context* context) : Turret(context)
{
RegisterObject(TowerDefenseTower);
- game_ =NULL;
+ game_ =nullptr;
this->setCollisionType(WorldEntity::None);
upgrade = 1;
Modified: code/branches/cpp11_v2/src/modules/weapons/IceGunFreezer.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/weapons/IceGunFreezer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/weapons/IceGunFreezer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -100,7 +100,7 @@
WorldEntity* parent = this->getParent();
// Check if the freezer is attached to a parent and check if the parent is a SpaceShip
- if (parent != NULL && parent->isA(Class(SpaceShip)))
+ if (parent != nullptr && parent->isA(Class(SpaceShip)))
{
freezedSpaceShip_ = orxonox_cast<SpaceShip*>(parent);
//Slow down the SpaceShip
@@ -117,7 +117,7 @@
*/
void IceGunFreezer::stopFreezing()
{
- if (freezedSpaceShip_ != NULL && freezeFactor_ != 0.0)
+ if (freezedSpaceShip_ != nullptr && freezeFactor_ != 0.0)
{
freezedSpaceShip_->addSpeedFactor(1/freezeFactor_);
}
Modified: code/branches/cpp11_v2/src/modules/weapons/projectiles/BasicProjectile.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/weapons/projectiles/BasicProjectile.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/weapons/projectiles/BasicProjectile.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -87,7 +87,7 @@
this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else.
// The projectile is destroyed by its tick()-function (in the following tick).
- Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is NULL
+ Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr
WorldEntity* entity = orxonox_cast<WorldEntity*>(this);
assert(entity); // The projectile must not be a WorldEntity.
@@ -145,10 +145,10 @@
*/
bool BasicProjectile::isObjectRelatedToShooter(WorldEntity* otherObject)
{
- for (WorldEntity* shooter = this->getShooter(); shooter != NULL; shooter = shooter->getParent())
+ for (WorldEntity* shooter = this->getShooter(); shooter != nullptr; shooter = shooter->getParent())
if (otherObject == shooter)
return true;
- for (WorldEntity* object = otherObject; object != NULL; object = object->getParent())
+ for (WorldEntity* object = otherObject; object != nullptr; object = object->getParent())
if (otherObject == this->getShooter())
return true;
Modified: code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -136,7 +136,7 @@
//orxout(debug_output) << "Found Pawn to damage: " << it->getWorldPosition() << endl;
float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS);
//orxout(debug_output) << "Damage: " << damage << endl;
- it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);
+ it->hit(shooter_, it->getWorldPosition(), nullptr, damage, 0,0);
victimsAlreadyDamaged_.push_back(*it);
}
}
Modified: code/branches/cpp11_v2/src/modules/weapons/projectiles/Projectile.cc
===================================================================
--- code/branches/cpp11_v2/src/modules/weapons/projectiles/Projectile.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/modules/weapons/projectiles/Projectile.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -93,7 +93,7 @@
void Projectile::setCollisionShapeRadius(float radius)
{
- if (collisionShape_ != NULL && radius > 0)
+ if (collisionShape_ != nullptr && radius > 0)
{
collisionShape_->setRadius(radius);
}
Modified: code/branches/cpp11_v2/src/orxonox/CameraManager.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/CameraManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/CameraManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -92,7 +92,7 @@
if (!this->cameraList_.empty())
this->cameraList_.front()->setFocus();
else
- this->useCamera(NULL);
+ this->useCamera(nullptr);
}
else
this->cameraList_.remove(camera);
Modified: code/branches/cpp11_v2/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/LevelManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/LevelManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -153,7 +153,7 @@
@brief
Get the currently active Level.
@return
- Returns a pointer to the currently active level or NULL if there currently are no active Levels.
+ Returns a pointer to the currently active level or nullptr if there currently are no active Levels.
*/
Level* LevelManager::getActiveLevel()
{
@@ -217,7 +217,7 @@
LevelInfoItem* LevelManager::getAvailableLevelListItem(unsigned int index)
{
if(index >= this->availableLevels_.size())
- return NULL;
+ return nullptr;
// If this index directly follows the last we can optimize a lot.
if(index == this->nextIndex_)
@@ -271,7 +271,7 @@
// TODO: Replace with tag?
if (it->find("old/") != 0)
{
- LevelInfoItem* info = NULL;
+ LevelInfoItem* info = nullptr;
// Load the LevelInfo object from the level file.
XMLFile file = XMLFile(*it);
@@ -285,7 +285,7 @@
// We don't need the loaded stuff anymore
Loader::getInstance().unload(&file);
- if(info == NULL)
+ if(info == nullptr)
{
// Create a default LevelInfoItem object that merely contains the name
std::string filenameWOExtension = it->substr(0, it->find(".oxw"));
Modified: code/branches/cpp11_v2/src/orxonox/Scene.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/Scene.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/Scene.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -65,7 +65,7 @@
this->bShadows_ = true;
this->bDebugDrawPhysics_ = false;
- this->debugDrawer_ = NULL;
+ this->debugDrawer_ = nullptr;
this->soundReferenceDistance_ = 20.0;
this->bIsUpdatingPhysics_ = false;
Modified: code/branches/cpp11_v2/src/orxonox/chat/ChatInputHandler.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/chat/ChatInputHandler.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/chat/ChatInputHandler.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -78,7 +78,7 @@
/* create necessary objects */
this->inpbuf = new InputBuffer();
this->disp_offset = 0;
- assert( this->inpbuf != NULL );
+ assert( this->inpbuf != nullptr );
/* generate chatbox ui and chatbox-inputonly ui */
GUIManager::getInstance().loadGUI( "ChatBox" );
Modified: code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -180,7 +180,7 @@
virtual btCollisionShape* createNewShape() const = 0;
btCollisionShape* collisionShape_; //!< The bullet collision shape of this CollisionShape.
- CompoundCollisionShape* parent_; //!< The CompoundCollisionShape this CollisionShape belongs to, NULL if it doesn't belong to one.
+ CompoundCollisionShape* parent_; //!< The CompoundCollisionShape this CollisionShape belongs to, nullptr if it doesn't belong to one.
unsigned int parentID_; //!< The objectID of the parent of this CollisionShape, which can either be a CompoundCollisionShape or a WorldEntity.
private:
Modified: code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -71,12 +71,12 @@
it->first->notifyDetached();
it->first->destroy();
if (this->collisionShape_ == it->second)
- this->collisionShape_ = NULL; // don't destroy it twice
+ this->collisionShape_ = nullptr; // don't destroy it twice
}
delete this->compoundShape_;
if (this->collisionShape_ == this->compoundShape_)
- this->collisionShape_ = NULL; // don't destroy it twice
+ this->collisionShape_ = nullptr; // don't destroy it twice
}
}
@@ -95,7 +95,7 @@
*/
void CompoundCollisionShape::attach(CollisionShape* shape)
{
- // If either the input shape is NULL or we try to attach the CollisionShape to itself.
+ // If either the input shape is nullptr or we try to attach the CollisionShape to itself.
if (!shape || static_cast<CollisionShape*>(this) == shape)
return;
Modified: code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -42,7 +42,7 @@
{
RegisterObject(WorldEntityCollisionShape);
- this->worldEntityOwner_ = NULL;
+ this->worldEntityOwner_ = nullptr;
// suppress synchronisation
this->setSyncMode(ObjectDirection::None);
}
Modified: code/branches/cpp11_v2/src/orxonox/controllers/AIController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/AIController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/AIController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -248,7 +248,7 @@
this->setPreviousMode();//no rocket entity -> get out of rocket mode
}
else
- this->setPreviousMode();//If bot dies -> getControllableEntity == NULL -> get out of ROCKET mode
+ this->setPreviousMode();//If bot dies -> getControllableEntity == nullptr -> get out of ROCKET mode
}//END_OF ROCKET MODE
SUPER(AIController, tick, dt);
Modified: code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
this->timeout_ = 0;
this->currentWaypoint_ = 0;
this->setAccuracy(5);
- this->defaultWaypoint_ = NULL;
+ this->defaultWaypoint_ = nullptr;
this->mode_ = DEFAULT;//Vector-implementation: mode_.push_back(DEFAULT);
}
@@ -221,7 +221,7 @@
void ArtificialController::boostControl()
{
SpaceShip* ship = orxonox_cast<SpaceShip*>(this->getControllableEntity());
- if(ship == NULL) return;
+ if(ship == nullptr) return;
if(ship->getBoostPower()*1.5f > ship->getInitialBoostPower() ) //upper limit ->boost
this->getControllableEntity()->boost(true);
else if(ship->getBoostPower()*4.0f < ship->getInitialBoostPower()) //lower limit ->do not boost
@@ -257,7 +257,7 @@
*/
void ArtificialController::updatePointsOfInterest(std::string name, float searchDistance)
{
- WorldEntity* waypoint = NULL;
+ WorldEntity* waypoint = nullptr;
for (WorldEntity* we : ObjectList<WorldEntity>())
{
if(we->getIdentifier() == ClassByString(name))
Modified: code/branches/cpp11_v2/src/orxonox/controllers/ControllerDirector.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/ControllerDirector.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/ControllerDirector.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -31,9 +31,9 @@
// Initialize member variables
- this->player_ = NULL;
- this->entity_ = NULL;
- this->pTrigger_ = NULL;
+ this->player_ = nullptr;
+ this->entity_ = nullptr;
+ this->pTrigger_ = nullptr;
this->context_ = context;
}
@@ -109,18 +109,18 @@
bool ControllerDirector::preparationToTakeControl(BaseObject * trigger)
{
this->pTrigger_ = orxonox_cast<PlayerTrigger*>(trigger);
- this->player_ = NULL;
+ this->player_ = nullptr;
orxout(verbose) << "Preparation to take Control!" << endl;
// Check whether it is a player trigger and extract pawn from it
- if(this->pTrigger_ != NULL)
+ if(this->pTrigger_ != nullptr)
{
// Get the object which triggered the event.
this->player_ = this->pTrigger_->getTriggeringPlayer();
// Check if there actually was a player returned.
- if( this->player_ == NULL) return false;
+ if( this->player_ == nullptr) return false;
}
else
{
Modified: code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -772,8 +772,8 @@
void FormationController::followme()
{
- Pawn *humanPawn = NULL;
- NewHumanController *currentHumanController = NULL;
+ Pawn *humanPawn = nullptr;
+ NewHumanController *currentHumanController = nullptr;
std::vector<FormationController*> allMasters;
for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
@@ -799,7 +799,7 @@
}
- if((humanPawn != NULL) && (allMasters.size() != 0))
+ if((humanPawn != nullptr) && (allMasters.size() != 0))
{
float posHuman = humanPawn->getPosition().length();
float distance = 0.0f;
@@ -825,7 +825,7 @@
*/
void FormationController::followInit(Pawn* pawn, const bool always, const int secondsToFollow)
{
- if (pawn == NULL || this->state_ != MASTER)
+ if (pawn == nullptr || this->state_ != MASTER)
return;
this->specificMasterAction_ = FOLLOW;
@@ -843,8 +843,8 @@
void FormationController::followRandomHumanInit()
{
- Pawn *humanPawn = NULL;
- NewHumanController *currentHumanController = NULL;
+ Pawn *humanPawn = nullptr;
+ NewHumanController *currentHumanController = nullptr;
for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it)
{
@@ -860,7 +860,7 @@
}
}
- if((humanPawn != NULL))
+ if((humanPawn != nullptr))
this->followInit(humanPawn);
}
Modified: code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -320,7 +320,7 @@
if (HumanController::localController_s)
return orxonox_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
else
- return NULL;
+ return nullptr;
}
void HumanController::cycleNavigationFocus()
Modified: code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -61,20 +61,20 @@
NewHumanController::NewHumanController(Context* context)
: HumanController(context)
- , crossHairOverlay_(NULL)
- , centerOverlay_(NULL)
- , damageOverlayTop_(NULL)
- , damageOverlayRight_(NULL)
- , damageOverlayBottom_(NULL)
- , damageOverlayLeft_(NULL)
+ , crossHairOverlay_(nullptr)
+ , centerOverlay_(nullptr)
+ , damageOverlayTop_(nullptr)
+ , damageOverlayRight_(nullptr)
+ , damageOverlayBottom_(nullptr)
+ , damageOverlayLeft_(nullptr)
, damageOverlayTT_(0)
, damageOverlayTR_(0)
, damageOverlayTB_(0)
, damageOverlayTL_(0)
- , arrowsOverlay1_(NULL)
- , arrowsOverlay2_(NULL)
- , arrowsOverlay3_(NULL)
- , arrowsOverlay4_(NULL)
+ , arrowsOverlay1_(nullptr)
+ , arrowsOverlay2_(nullptr)
+ , arrowsOverlay3_(nullptr)
+ , arrowsOverlay4_(nullptr)
{
RegisterObject(NewHumanController);
Modified: code/branches/cpp11_v2/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/ScriptController.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/controllers/ScriptController.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -63,8 +63,8 @@
/* Set default values for all variables */
/* - pointers to zero */
- this->player_ = NULL;
- this->entity_ = NULL;
+ this->player_ = nullptr;
+ this->entity_ = nullptr;
/* - times */
this->scTime = 0.0f;
@@ -137,7 +137,7 @@
}
}
- return NULL;
+ return nullptr;
}
void ScriptController::execute(event ev)
Modified: code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -155,7 +155,7 @@
if (GameMode::isStandalone())
{
ModifyConsoleCommand(__CC_changeGame_name).deactivate();
- ModifyConsoleCommand(__CC_reloadLevel_name).setObject(NULL).deactivate();
+ ModifyConsoleCommand(__CC_reloadLevel_name).setObject(nullptr).deactivate();
}
}
Modified: code/branches/cpp11_v2/src/orxonox/gamestates/GSLevelMemento.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gamestates/GSLevelMemento.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/gamestates/GSLevelMemento.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -47,7 +47,7 @@
protected:
/**
- * Returns the state of this memento. Returns NULL if no state needed to persist.
+ * Returns the state of this memento. Returns nullptr if no state needed to persist.
*/
virtual GSLevelMementoState* exportMementoState() = 0;
Modified: code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -72,7 +72,7 @@
InputManager::getInstance().createInputState("MainMenuHackery", true, true)->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
// create an empty Scene
- this->scene_ = new Scene(NULL);
+ this->scene_ = new Scene(nullptr);
this->scene_->setSyncMode( 0x0 );
// and a Camera
this->camera_ = this->scene_->getSceneManager()->createCamera("mainMenu/Camera");
Modified: code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -91,8 +91,8 @@
if (this->gtinfo_)
this->gtinfo_->destroy();
- ModifyConsoleCommand(__CC_addBots_name).setObject(NULL);
- ModifyConsoleCommand(__CC_killBots_name).setObject(NULL);
+ ModifyConsoleCommand(__CC_addBots_name).setObject(nullptr);
+ ModifyConsoleCommand(__CC_killBots_name).setObject(nullptr);
}
}
@@ -336,7 +336,7 @@
if (this->spawnpoints_.size() > 0)
{
// Fallback spawn point if there is no active one, choose a random one.
- SpawnPoint* fallbackSpawnPoint = NULL;
+ SpawnPoint* fallbackSpawnPoint = nullptr;
unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
unsigned int index = 0;
std::vector<SpawnPoint*> activeSpawnPoints;
@@ -345,7 +345,7 @@
if (index == randomspawn)
fallbackSpawnPoint = (*it);
- if (*it != NULL && (*it)->isActive())
+ if (*it != nullptr && (*it)->isActive())
activeSpawnPoints.push_back(*it);
++index;
@@ -551,13 +551,13 @@
}
}
- return NULL;
+ return nullptr;
}
void Gametype::importMementoState(const std::vector<GSLevelMementoState*>& states)
{
// find correct memento state
- GametypeMementoState* state = NULL;
+ GametypeMementoState* state = nullptr;
for (size_t i = 0; i < states.size(); ++i)
{
state = dynamic_cast<GametypeMementoState*>(states[i]);
@@ -569,7 +569,7 @@
return;
// find correct scene
- Scene* scene = NULL;
+ Scene* scene = nullptr;
for (ObjectList<Scene>::iterator it = ObjectList<Scene>::begin(); it != ObjectList<Scene>::end(); ++it)
{
if (it->getName() == state->sceneName_)
Modified: code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -74,7 +74,7 @@
void TeamGametype::playerEntered(PlayerInfo* player)
{
- if(player == NULL) return; // catch null pointers
+ if(player == nullptr) return; // catch null pointers
Gametype::playerEntered(player);
this->findAndSetTeam(player);
if( this->players_.size() <= maxPlayers_ || maxPlayers_ == 0)
@@ -95,7 +95,7 @@
*/
void TeamGametype::findAndSetTeam(PlayerInfo* player)
{
- if(player == NULL) return; // catch null pointers
+ if(player == nullptr) return; // catch null pointers
std::vector<unsigned int> playersperteam(this->teams_, 0);
for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
@@ -234,7 +234,7 @@
++it;
}
- SpawnPoint* fallbackSpawnPoint = NULL;
+ SpawnPoint* fallbackSpawnPoint = nullptr;
if (teamSpawnPoints.size() > 0)
{
unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
@@ -327,7 +327,7 @@
*/
void TeamGametype::setDefaultObjectColour(Pawn* pawn)
{
- if(pawn == NULL)
+ if(pawn == nullptr)
return;
int teamnumber = pawn->getTeam();
@@ -349,7 +349,7 @@
ArtificialController* artificial = orxonox_cast<ArtificialController*>(controller);
//get Teamnumber - get the data
- if(artificial == NULL)
+ if(artificial == nullptr)
return;
teamnumber= artificial->getTeam();
@@ -359,7 +359,7 @@
void TeamGametype::colourPawn(Pawn* pawn, int teamNr)
{// catch: no-colouring-case and wrong input
- if(teamNr < 0 || teamNr+1 > int(this->teamcolours_.size()) ||pawn == NULL) return;
+ if(teamNr < 0 || teamNr+1 > int(this->teamcolours_.size()) ||pawn == nullptr) return;
pawn->setRadarObjectColour(this->teamcolours_[teamNr]);
std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
Modified: code/branches/cpp11_v2/src/orxonox/graphics/Billboard.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/graphics/Billboard.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/graphics/Billboard.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -138,7 +138,7 @@
void Billboard::setBillboardType(Ogre::BillboardType bbt)
{
Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
- if( bSet != NULL )
+ if( bSet != nullptr )
{
bSet->setBillboardType(bbt);
}
@@ -147,7 +147,7 @@
void Billboard::setCommonDirection(Vector3 vec)
{
Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
- if( bSet != NULL )
+ if( bSet != nullptr )
{
bSet->setCommonDirection( vec );
}
@@ -156,7 +156,7 @@
void Billboard::setCommonUpVector(Vector3 vec)
{
Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
- if( bSet != NULL )
+ if( bSet != nullptr )
{
bSet->setCommonUpVector( vec );
}
@@ -165,7 +165,7 @@
void Billboard::setDefaultDimensions(float width, float height)
{
Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
- if( bSet != NULL )
+ if( bSet != nullptr )
{
bSet->setDefaultDimensions(width, height);
}
Modified: code/branches/cpp11_v2/src/orxonox/graphics/Model.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/graphics/Model.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/graphics/Model.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -156,7 +156,7 @@
BaseObject* creatorPtr = this;
- while(creatorPtr!=NULL&&orxonox_cast<WorldEntity*>(creatorPtr))
+ while(creatorPtr!=nullptr&&orxonox_cast<WorldEntity*>(creatorPtr))
{
scaleFactor *= getBiggestScale(((WorldEntity*) creatorPtr)->getScale3D());
creatorPtr = creatorPtr->getCreator();
Modified: code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -180,7 +180,7 @@
this->changedControllableEntity();
RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
- if (radarviewable != NULL)
+ if (radarviewable != nullptr)
radarviewable->setRadarName(this->getName());
}
@@ -234,13 +234,13 @@
return;
Controller* tmp =this->controllableEntity_->getController();
- if (tmp == NULL)
+ if (tmp == nullptr)
{
- orxout(verbose) << "PlayerInfo: pauseControl, Controller is NULL " << endl;
+ orxout(verbose) << "PlayerInfo: pauseControl, Controller is nullptr " << endl;
return;
}
tmp->setActive(false);
- //this->controllableEntity_->getController()->setControllableEntity(NULL);
+ //this->controllableEntity_->getController()->setControllableEntity(nullptr);
this->controllableEntity_->setController(0);
}
@@ -248,7 +248,7 @@
{
ControllableEntity* entity = this->controllableEntity_;
- assert(this->controllableEntity_ != NULL);
+ assert(this->controllableEntity_ != nullptr);
if( !entity || this->previousControllableEntity_.size() == 0 )
return;
@@ -259,15 +259,15 @@
// this->controllableEntity_ = this->previousControllableEntity_.back();
do {
this->controllableEntity_ = this->previousControllableEntity_.back();
- } while(this->controllableEntity_ == NULL && this->previousControllableEntity_.size() > 0);
+ } while(this->controllableEntity_ == nullptr && this->previousControllableEntity_.size() > 0);
this->controllableEntityID_ = this->controllableEntity_->getObjectID();
this->previousControllableEntity_.pop_back();
- if ( this->controllableEntity_ != NULL && this->controller_ != NULL)
+ if ( this->controllableEntity_ != nullptr && this->controller_ != nullptr)
this->controller_->setControllableEntity(this->controllableEntity_);
// HACK-ish
- if(this->controllableEntity_ != NULL && this->isHumanPlayer())
+ if(this->controllableEntity_ != nullptr && this->isHumanPlayer())
this->controllableEntity_->createHud();
if ( GameMode::isMaster() )
Modified: code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -126,12 +126,12 @@
PickupCarrier* PickupCarrier::getTarget(const Pickupable* pickup)
{
if(!this->isTarget(pickup))
- return NULL;
+ return nullptr;
if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
return this;
- PickupCarrier* target = NULL;
+ PickupCarrier* target = nullptr;
// Go recursively through all children to check whether they are the target.
std::vector<PickupCarrier*>* children = this->getCarrierChildren();
for(std::vector<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++)
Modified: code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -58,7 +58,7 @@
Different PickupCarriers are structured hierarchically, a pickup can be picked up by a PickupCarrier that can't really carry that particular pickup but one of its children (or one of their children) can, and thus it gets "handed down" until it is at the right place.
But this structure has to be established first.
- <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonox::Engine "Engine".
- - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or NULL if the PickupCarrier is a root node in this hierarchy.
+ - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or nullptr if the PickupCarrier is a root node in this hierarchy.
@author
Damian 'Mozork' Frick
Modified: code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -55,7 +55,7 @@
{
RegisterObject(Pickupable);
- this->carrier_ = NULL;
+ this->carrier_ = nullptr;
this->beingDestroyed_ = false;
this->enabled_ = true;
@@ -142,7 +142,7 @@
*/
bool Pickupable::isTarget(const PickupCarrier* carrier) const
{
- if(carrier == NULL)
+ if(carrier == nullptr)
return false;
return this->isTarget(carrier->getIdentifier());
@@ -209,7 +209,7 @@
*/
bool Pickupable::pickup(PickupCarrier* carrier)
{
- if(carrier == NULL || this->isPickedUp()) // If carrier is NULL or the Pickupable is already picked up.
+ if(carrier == nullptr || this->isPickedUp()) // If carrier is nullptr or the Pickupable is already picked up.
return false;
if(!this->setCarrier(carrier))
@@ -236,7 +236,7 @@
if(!this->isPickedUp()) // If the Pickupable is not picked up.
return false;
- assert(this->getCarrier()); // The Carrier cannot be NULL at this point.
+ assert(this->getCarrier()); // The Carrier cannot be nullptr at this point.
if(!this->getCarrier()->removePickup(this)) //TODO Shouldn't this be a little later?
orxout(internal_warning, context::pickups) << "Pickupable (&" << this << ", " << this->getIdentifier()->getName() << ") is being dropped, but it was not present in the PickupCarriers list of pickups." << endl;
@@ -248,7 +248,7 @@
if(createSpawner)
created = this->createSpawner();
- this->setCarrier(NULL);
+ this->setCarrier(nullptr);
if(!created && createSpawner) // If a PickupSpawner should have been created but wasn't.
this->destroy();
@@ -300,7 +300,7 @@
orxout(verbose, context::pickups) << "Pickupable (&" << this << ") changed Carrier (& " << carrier << ")." << endl;
- if(carrier != NULL && tell)
+ if(carrier != nullptr && tell)
{
if(!carrier->addPickup(this))
return false;
Modified: code/branches/cpp11_v2/src/orxonox/items/Engine.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/items/Engine.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/items/Engine.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -154,13 +154,13 @@
*/
void Engine::run(float dt)
{
- if (this->ship_ == NULL)
+ if (this->ship_ == nullptr)
{
if (this->shipID_ != 0)
{
this->networkcallback_shipID();
- if (this->ship_ == NULL)
+ if (this->ship_ == nullptr)
return;
}
else
Modified: code/branches/cpp11_v2/src/orxonox/items/Engine.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/items/Engine.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/items/Engine.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -66,7 +66,7 @@
virtual void addToSpaceShip(SpaceShip* ship); // Adds the Engine to the input SpaceShip.
/**
@brief Get the SpaceShip this Engine is mounted on.
- @return Returns a pointer to the SpaceShip. NULL if it isn't mounted on any ship.
+ @return Returns a pointer to the SpaceShip. nullptr if it isn't mounted on any ship.
*/
inline SpaceShip* getShip() const
{ return this->ship_; }
Modified: code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -204,7 +204,7 @@
void MultiStateEngine::addEffectContainer(EffectContainer* effect)
{
- if (effect == NULL)
+ if (effect == nullptr)
return;
effect->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size()));
this->effectContainers_.push_back(effect);
@@ -223,7 +223,7 @@
if (i == index)
return (*it);
}
- return NULL;
+ return nullptr;
}
void MultiStateEngine::setDefEngSndNormal(const std::string &engineSound)
Modified: code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -49,7 +49,7 @@
RegisterClass(ShipPart);
ShipPart::ShipPart(Context* context)
- : Item(context), parent_(NULL)
+ : Item(context), parent_(nullptr)
{
RegisterObject(ShipPart);
this->eventExecution_ = true;
@@ -121,7 +121,7 @@
*/
void ShipPart::addEntity(StaticEntity* entity)
{
- OrxAssert(entity != NULL, "The Entity cannot be NULL.");
+ OrxAssert(entity != nullptr, "The Entity cannot be nullptr.");
this->entityList_.push_back(entity);
}
@@ -129,12 +129,12 @@
@brief
Get the i-th StaticEntity of the ShipPart.
@return
- Returns a pointer to the i-the StaticEntity. NULL if there is no StaticEntity with that index.
+ Returns a pointer to the i-the StaticEntity. nullptr if there is no StaticEntity with that index.
*/
StaticEntity* ShipPart::getEntity(unsigned int index)
{
if(this->entityList_.size() >= index)
- return NULL;
+ return nullptr;
else
return this->entityList_[index];
}
@@ -163,7 +163,7 @@
*/
void ShipPart::addDestructionEvent(PartDestructionEvent* event)
{
- OrxAssert(event != NULL, "The PartDestructionEvent cannot be NULL.");
+ OrxAssert(event != nullptr, "The PartDestructionEvent cannot be nullptr.");
event->setParent(this);
this->eventList_.push_back(event);
}
@@ -172,12 +172,12 @@
@brief
Get the i-th PartDestructionEvent of the ShipPart.
@return
- Returns a pointer to the i-the PartDestructionEvent. NULL if there is no PartDestructionEvent with that index.
+ Returns a pointer to the i-the PartDestructionEvent. nullptr if there is no PartDestructionEvent with that index.
*/
PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index)
{
if(this->eventList_.size() <= index)
- return NULL;
+ return nullptr;
else
return this->eventList_[index];
}
Modified: code/branches/cpp11_v2/src/orxonox/sound/AmbientSound.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/AmbientSound.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/sound/AmbientSound.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -92,7 +92,7 @@
{
const std::string& path = "ambient/" + mood + '/' + this->ambientSource_;
shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(path);
- if (fileInfo != NULL)
+ if (fileInfo != nullptr)
{
orxout(user_info) << "Loading ambient sound " << path << "..." << endl; // TODO: make this output internal if we implement sound streaming
this->setSource(path);
Modified: code/branches/cpp11_v2/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/BaseSound.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/sound/BaseSound.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -65,7 +65,7 @@
if (this->state_ != Stopped)
this->stop();
// Release buffer
- if (this->soundBuffer_ != NULL)
+ if (this->soundBuffer_ != nullptr)
{
assert(GameMode::playsSound());
SoundManager::getInstance().releaseSoundBuffer(this->soundBuffer_, this->bPooling_);
@@ -83,7 +83,7 @@
void BaseSound::doPlay()
{
this->state_ = Playing;
- if (GameMode::playsSound() && this->getSourceState() != AL_PLAYING && this->soundBuffer_ != NULL)
+ if (GameMode::playsSound() && this->getSourceState() != AL_PLAYING && this->soundBuffer_ != nullptr)
{
if (!alIsSource(this->audioSource_))
{
@@ -150,7 +150,7 @@
if (ALint error = alGetError())
orxout(internal_warning, context::sound) << "Setting source parameters to 0 failed: "
<< SoundManager::getALErrorString(error) << endl;
- assert(this->soundBuffer_ != NULL);
+ assert(this->soundBuffer_ != nullptr);
alSourcei(this->audioSource_, AL_BUFFER, this->soundBuffer_->getBuffer());
if (ALuint error = alGetError())
orxout(internal_error, context::sound) << "Could not set buffer \"" << this->source_ << "\": " << SoundManager::getALErrorString(error) << endl;
@@ -208,7 +208,7 @@
return;
}
- if (this->soundBuffer_ != NULL)
+ if (this->soundBuffer_ != nullptr)
{
if (this->soundBuffer_->getFilename() == source)
{
@@ -232,7 +232,7 @@
// Get new sound buffer
this->soundBuffer_ = SoundManager::getInstance().getSoundBuffer(this->source_);
- if (this->soundBuffer_ == NULL)
+ if (this->soundBuffer_ == nullptr)
return;
if (alIsSource(this->audioSource_)) // already playing or paused
Modified: code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -44,11 +44,11 @@
, poolIterator_(poolIterator)
{
if (this->filename_.empty())
- ThrowException(General, "SoundBuffer construction: fileInfo was NULL");
+ ThrowException(General, "SoundBuffer construction: fileInfo was nullptr");
// Get resource info
shared_ptr<ResourceInfo> fileInfo = Resource::getInfo(filename);
- if (fileInfo == NULL)
+ if (fileInfo == nullptr)
{
orxout(internal_error, context::sound) << "Sound file '" << filename << "' not found" << endl;
return;
@@ -137,10 +137,10 @@
vorbisCallbacks.read_func = &readVorbis;
vorbisCallbacks.seek_func = &seekVorbis;
vorbisCallbacks.tell_func = &tellVorbis;
- vorbisCallbacks.close_func = NULL;
+ vorbisCallbacks.close_func = nullptr;
OggVorbis_File vf;
- int ret = ov_open_callbacks(dataStream.get(), &vf, NULL, 0, vorbisCallbacks);
+ int ret = ov_open_callbacks(dataStream.get(), &vf, nullptr, 0, vorbisCallbacks);
if (ret < 0)
{
orxout(internal_error, context::sound) << "libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << endl;
Modified: code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -82,14 +82,14 @@
if (bDisableSound_)
ThrowException(InitialisationAborted, "Sound: Not loading at all");
#if !defined(ORXONOX_PLATFORM_APPLE)
- if (!alutInitWithoutContext(NULL, NULL))
+ if (!alutInitWithoutContext(nullptr, nullptr))
ThrowException(InitialisationFailed, "Sound Error: ALUT initialisation failed: " << alutGetErrorString(alutGetError()));
Loki::ScopeGuard alutExitGuard = Loki::MakeGuard(&alutExit);
#endif
/*
// Get list of available sound devices and display them
- const char* devices = alcGetString(NULL, ALC_DEVICE_SPECIFIER);
+ const char* devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
char* device = new char[strlen(devices)+1];
strcpy(device, devices);
std::string renderDevice;
@@ -109,14 +109,14 @@
orxout(internal_info, context::sound) << "Sound: Opening device \"" << renderDevice << '\' << endl;
this->device_ = alcOpenDevice(renderDevice.c_str());
*/
- this->device_ = alcOpenDevice(NULL);
- if (this->device_ == NULL)
+ this->device_ = alcOpenDevice(nullptr);
+ if (this->device_ == nullptr)
ThrowException(InitialisationFailed, "Sound Error: Could not open sound device.");
Loki::ScopeGuard closeDeviceGuard = Loki::MakeGuard(&alcCloseDevice, this->device_);
// Create sound context and make it the currently used one
- this->context_ = alcCreateContext(this->device_, NULL);
- if (this->context_ == NULL)
+ this->context_ = alcCreateContext(this->device_, nullptr);
+ if (this->context_ == nullptr)
ThrowException(InitialisationFailed, "Sound Error: Could not create ALC context");
Loki::ScopeGuard desroyContextGuard = Loki::MakeGuard(&alcDestroyContext, this->context_);
if (!alcMakeContextCurrent(this->context_))
@@ -188,7 +188,7 @@
GameMode::setPlaysSound(false);
// Relieve context to destroy it
- if (!alcMakeContextCurrent(NULL))
+ if (!alcMakeContextCurrent(nullptr))
orxout(internal_error, context::sound) << "Could not unset ALC context" << endl;
alcDestroyContext(this->context_);
if (ALCenum error = alcGetError(this->device_))
@@ -349,7 +349,7 @@
void SoundManager::registerAmbientSound(AmbientSound* newAmbient)
{
- if (newAmbient != NULL && !this->bDestructorCalled_)
+ if (newAmbient != nullptr && !this->bDestructorCalled_)
{
for (AmbientList::const_iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
{
@@ -372,7 +372,7 @@
void SoundManager::unregisterAmbientSound(AmbientSound* oldAmbient)
{
- if (oldAmbient == NULL || ambientSounds_.empty() || this->bDestructorCalled_)
+ if (oldAmbient == nullptr || ambientSounds_.empty() || this->bDestructorCalled_)
return;
if (this->ambientSounds_.front().first == oldAmbient)
@@ -404,7 +404,7 @@
void SoundManager::pauseAmbientSound(AmbientSound* ambient)
{
- if (ambient != NULL)
+ if (ambient != nullptr)
{
for (AmbientList::iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
{
Modified: code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -44,10 +44,10 @@
vorbisCallbacks.read_func = &readVorbis;
vorbisCallbacks.seek_func = &seekVorbis;
vorbisCallbacks.tell_func = &tellVorbis;
- vorbisCallbacks.close_func = NULL;
+ vorbisCallbacks.close_func = nullptr;
OggVorbis_File vf;
- int ret = ov_open_callbacks(dataStream.get(), &vf, NULL, 0, vorbisCallbacks);
+ int ret = ov_open_callbacks(dataStream.get(), &vf, nullptr, 0, vorbisCallbacks);
if (ret < 0)
{
orxout(internal_error, context::sound) << "libvorbisfile: File does not seem to be an Ogg Vorbis bitstream" << endl;
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -61,7 +61,7 @@
this->server_overwrite_ = 0;
this->client_overwrite_ = 0;
this->player_ = 0;
- this->formerPlayer_ = NULL;
+ this->formerPlayer_ = nullptr;
this->playerID_ = OBJECTID_UNKNOWN;
this->hud_ = 0;
this->camera_ = 0;
@@ -193,7 +193,7 @@
bool ControllableEntity::setCameraPosition(unsigned int index)
{
- if(this->camera_ != NULL && this->cameraPositions_.size() > 0)
+ if(this->camera_ != nullptr && this->cameraPositions_.size() > 0)
{
if(index >= this->cameraPositions_.size())
index = 0;
@@ -349,7 +349,7 @@
this->playerID_ = player->getObjectID();
this->bHasLocalController_ = player->isLocalPlayer();
this->bHasHumanController_ = player->isHumanPlayer();
- if(controller_ != NULL)
+ if(controller_ != nullptr)
this->team_ = controller_->getTeam(); // forward controller team number
if (this->bHasLocalController_ && this->bHasHumanController_)
@@ -433,10 +433,10 @@
void ControllableEntity::destroyHud(void)
{
- if (this->hud_ != NULL)
+ if (this->hud_ != nullptr)
{
this->hud_->destroy();
- this->hud_ = NULL;
+ this->hud_ = nullptr;
}
}
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -43,7 +43,7 @@
EffectContainer::EffectContainer(Context* context)
: BaseObject(context)
- , lua_(NULL)
+ , lua_(nullptr)
{
RegisterObject(EffectContainer);
}
@@ -91,7 +91,7 @@
for (std::vector<WorldEntity*>::const_iterator it = this->effects_.begin(); it != this->effects_.end(); ++it)
if (i == index)
return (*it);
- return NULL;
+ return nullptr;
}
void EffectContainer::updateCondition()
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -562,7 +562,7 @@
//! Detaches an Ogre::MovableObject from this WorldEntity.
void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
{
- object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(NULL)));
+ object->setUserAny(Ogre::Any(static_cast<OrxonoxClass*>(nullptr)));
this->node_->detachObject(object);
}
@@ -659,7 +659,7 @@
void WorldEntity::setScale3D(const Vector3& scale)
{
// If physics is enabled scale the attached CollisionShape.
- /*if (this->hasPhysics() && this->collisionShape_ != NULL)
+ /*if (this->hasPhysics() && this->collisionShape_ != nullptr)
{
this->collisionShape_->setScale3D(scale);
}*/
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -93,7 +93,7 @@
// iterate through all attached objects
for (unsigned int i=0; i < this->getAttachedObjects().size(); i++)
{
- if (this->getAttachedObject(i) == NULL)
+ if (this->getAttachedObject(i) == nullptr)
{
break;
}
@@ -150,7 +150,7 @@
if (it->first == entity)
return it->second;
}
- return NULL;
+ return nullptr;
}
/**
@@ -159,7 +159,7 @@
*/
void ModularSpaceShip::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
{
- if (cs != NULL && this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != NULL)
+ if (cs != nullptr && this->getPartOfEntity((StaticEntity*)(cs->getUserPointer())) != nullptr)
this->getPartOfEntity((StaticEntity*)(cs->getUserPointer()))->handleHit(damage, healthdamage, shielddamage, originator);
else
SpaceShip::damage(damage, healthdamage, shielddamage, originator, cs);
@@ -211,7 +211,7 @@
*/
void ModularSpaceShip::addShipPart(ShipPart* part)
{
- OrxAssert(part != NULL, "The ShipPart cannot be NULL.");
+ OrxAssert(part != nullptr, "The ShipPart cannot be nullptr.");
this->partList_.push_back(part);
part->setParent(this);
this->updatePartAssignment();
@@ -221,12 +221,12 @@
@brief
Get the i-th ShipPart of the SpaceShip.
@return
- Returns a pointer to the i-the ShipPart. NULL if there is no ShipPart with that index.
+ Returns a pointer to the i-the ShipPart. nullptr if there is no ShipPart with that index.
*/
ShipPart* ModularSpaceShip::getShipPart(unsigned int index)
{
if(this->partList_.size() <= index)
- return NULL;
+ return nullptr;
else
return this->partList_[index];
}
@@ -237,7 +237,7 @@
@param name
The name of the ShipPart to be returned.
@return
- Pointer to the ShipPart with the given name, or NULL if not found.
+ Pointer to the ShipPart with the given name, or nullptr if not found.
*/
ShipPart* ModularSpaceShip::getShipPartByName(std::string name)
{
@@ -249,7 +249,7 @@
}
}
orxout(internal_warning) << "Couldn't find ShipPart with name \"" << name << "\"." << endl;
- return NULL;
+ return nullptr;
}
/**
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -108,7 +108,7 @@
void addPartEntityAssignment(StaticEntity* entity, ShipPart* part);
ShipPart* getPartOfEntity(StaticEntity* entity) const;
- virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
+ virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr);
static void killShipPartStatic(std::string name);
void killShipPart(std::string name);
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h 2015-11-04 21:25:42 UTC (rev 10765)
@@ -207,14 +207,14 @@
virtual void spawneffect();
//virtual void damage(float damage, Pawn* originator = 0);
- virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL, const btCollisionShape* cs = NULL);
+ virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr);
bool bAlive_;
virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
{ return new std::vector<PickupCarrier*>(); }
virtual PickupCarrier* getCarrierParent(void) const
- { return NULL; }
+ { return nullptr; }
float health_;
Modified: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -47,7 +47,7 @@
{
RegisterClass(SpaceShip);
- SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL)
+ SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(nullptr)
{
RegisterObject(SpaceShip);
@@ -195,7 +195,7 @@
// Enable Blur depending on settings
if(this->bEnableMotionBlur_)
{
- if (this->boostBlur_ == NULL && this->hasLocalController() && this->hasHumanController())
+ if (this->boostBlur_ == nullptr && this->hasLocalController() && this->hasHumanController())
{
this->boostBlur_ = new Shader(this->getScene()->getSceneManager());
this->boostBlur_->setCompositorName("Radial Blur");
@@ -304,7 +304,7 @@
*/
void SpaceShip::addEngine(orxonox::Engine* engine)
{
- OrxAssert(engine != NULL, "The engine cannot be NULL.");
+ OrxAssert(engine != nullptr, "The engine cannot be nullptr.");
this->engineList_.push_back(engine);
engine->addToSpaceShip(this);
}
@@ -329,12 +329,12 @@
@brief
Get the i-th Engine of the SpaceShip.
@return
- Returns a pointer to the i-the Engine. NULL if there is no Engine with that index.
+ Returns a pointer to the i-the Engine. nullptr if there is no Engine with that index.
*/
Engine* SpaceShip::getEngine(unsigned int i)
{
if(this->engineList_.size() >= i)
- return NULL;
+ return nullptr;
else
return this->engineList_[i];
}
@@ -345,7 +345,7 @@
@param name
The name of the engine to be returned.
@return
- Pointer to the engine with the given name, or NULL if not found.
+ Pointer to the engine with the given name, or nullptr if not found.
*/
Engine* SpaceShip::getEngineByName(const std::string& name)
{
@@ -354,7 +354,7 @@
return this->engineList_[i];
orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl;
- return NULL;
+ return nullptr;
}
/**
@@ -464,10 +464,10 @@
*/
void SpaceShip::changedEnableMotionBlur()
{
- if (!this->bEnableMotionBlur_ && this->boostBlur_ != NULL)
+ if (!this->bEnableMotionBlur_ && this->boostBlur_ != nullptr)
{
delete this->boostBlur_;
- this->boostBlur_ = NULL;
+ this->boostBlur_ = nullptr;
}
}
@@ -509,7 +509,7 @@
void SpaceShip::backupCamera()
{
Camera* camera = CameraManager::getInstance().getActiveCamera();
- if(camera != NULL)
+ if(camera != nullptr)
{
this->cameraOriginalPosition_ = camera->getPosition();
this->cameraOriginalOrientation_ = camera->getOrientation();
Modified: code/branches/cpp11_v2/test/core/class/IdentifiableTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/IdentifiableTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/IdentifiableTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -36,7 +36,7 @@
TEST_F(IdentifiableTest, CanCreate)
{
IdentifiableClass* test = new IdentifiableClass();
- ASSERT_TRUE(test != NULL);
+ ASSERT_TRUE(test != nullptr);
delete test;
}
Modified: code/branches/cpp11_v2/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/IdentifierClassHierarchyTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/IdentifierClassHierarchyTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -143,7 +143,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
Modified: code/branches/cpp11_v2/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/IdentifierExternalClassHierarchyTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/IdentifierExternalClassHierarchyTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -50,7 +50,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
Modified: code/branches/cpp11_v2/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/IdentifierNestedClassHierarchyTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/IdentifierNestedClassHierarchyTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -110,7 +110,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
Modified: code/branches/cpp11_v2/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/IdentifierSimpleClassHierarchyTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/IdentifierSimpleClassHierarchyTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -52,7 +52,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
Modified: code/branches/cpp11_v2/test/core/class/IdentifierTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/IdentifierTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/IdentifierTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -45,7 +45,7 @@
TestClass test;
Identifier* identifier = Class(TestClass);
- EXPECT_TRUE(identifier != NULL);
+ EXPECT_TRUE(identifier != nullptr);
}
TEST_F(IdentifierTest, IdentifierExistsOfSubclass)
@@ -53,7 +53,7 @@
TestSubclass test;
Identifier* identifier = Class(TestSubclass);
- EXPECT_TRUE(identifier != NULL);
+ EXPECT_TRUE(identifier != nullptr);
}
TEST_F(IdentifierTest, HasNameOfClass)
Modified: code/branches/cpp11_v2/test/core/class/OrxonoxClassTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/OrxonoxClassTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/OrxonoxClassTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -18,7 +18,7 @@
virtual void SetUp()
{
new IdentifierManager();
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
@@ -32,7 +32,7 @@
TEST_F(OrxonoxClassTest, CanCreate)
{
TestClass* test = new TestClass();
- ASSERT_TRUE(test != NULL);
+ ASSERT_TRUE(test != nullptr);
delete test;
}
}
Modified: code/branches/cpp11_v2/test/core/class/OrxonoxInterfaceTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/OrxonoxInterfaceTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/OrxonoxInterfaceTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -33,7 +33,7 @@
virtual void SetUp()
{
new IdentifierManager();
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
@@ -47,14 +47,14 @@
TEST_F(OrxonoxInterfaceTest, CanCreate1)
{
TestClass1* test = new TestClass1();
- ASSERT_TRUE(test != NULL);
+ ASSERT_TRUE(test != nullptr);
delete test;
}
TEST_F(OrxonoxInterfaceTest, CanCreate2)
{
TestClass2* test = new TestClass2();
- ASSERT_TRUE(test != NULL);
+ ASSERT_TRUE(test != nullptr);
delete test;
}
}
Modified: code/branches/cpp11_v2/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/SubclassIdentifierTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/SubclassIdentifierTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -12,13 +12,13 @@
class TestClass : public OrxonoxClass
{
public:
- TestClass(Context* context = NULL) { RegisterObject(TestClass); }
+ TestClass(Context* context = nullptr) { RegisterObject(TestClass); }
};
class TestSubclass : public TestClass
{
public:
- TestSubclass(Context* context = NULL) { RegisterObject(TestSubclass); }
+ TestSubclass(Context* context = nullptr) { RegisterObject(TestSubclass); }
};
RegisterClass(TestClass);
@@ -32,7 +32,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
@@ -76,8 +76,8 @@
SubclassIdentifier<TestClass> subclassIdentifier;
subclassIdentifier = Class(TestSubclass);
- TestClass* instance = subclassIdentifier.fabricate(NULL);
- ASSERT_TRUE(instance != NULL);
+ TestClass* instance = subclassIdentifier.fabricate(nullptr);
+ ASSERT_TRUE(instance != nullptr);
EXPECT_EQ(Class(TestSubclass), instance->getIdentifier());
delete instance;
}
Modified: code/branches/cpp11_v2/test/core/class/SuperTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/class/SuperTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/class/SuperTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -13,7 +13,7 @@
class TestClass : public BaseObject
{
public:
- TestClass(Context* context = NULL) : BaseObject(context), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP)
+ TestClass(Context* context = nullptr) : BaseObject(context), changedNameBase_(false), xmlPortBase_(false), modeBase_(XMLPort::NOP)
{
RegisterObject(TestClass);
}
@@ -37,7 +37,7 @@
class TestSubclass : public TestClass
{
public:
- TestSubclass(Context* context = NULL) : TestClass(context), changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP)
+ TestSubclass(Context* context = nullptr) : TestClass(context), changedNameSubclass_(false), xmlPortSubclass_(false), modeSubclass_(XMLPort::NOP)
{
RegisterObject(TestSubclass);
}
@@ -73,7 +73,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
@@ -131,7 +131,7 @@
EXPECT_EQ(XMLPort::NOP, test.modeBase_);
EXPECT_EQ(XMLPort::NOP, test.modeSubclass_);
- Element* element = NULL;
+ Element* element = nullptr;
test.XMLPort(*element, XMLPort::SaveObject);
EXPECT_TRUE(test.xmlPortBase_);
Modified: code/branches/cpp11_v2/test/core/command/CommandTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/command/CommandTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/command/CommandTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -142,7 +142,7 @@
new IdentifierManager();
new ConsoleCommandManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::CONSOLE_COMMAND);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
Identifier::initConfigValues_s = false; // TODO: hack!
IdentifierManager::getInstance().createClassHierarchy();
}
Modified: code/branches/cpp11_v2/test/core/object/ClassFactoryTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/ClassFactoryTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/ClassFactoryTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -17,7 +17,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
@@ -32,10 +32,10 @@
TEST_F(ClassFactoryTest, CanFabricateObject)
{
Factory* factory = new ClassFactoryWithContext<BaseObject>();
- Identifiable* object = factory->fabricate(NULL);
- ASSERT_TRUE(object != NULL);
+ Identifiable* object = factory->fabricate(nullptr);
+ ASSERT_TRUE(object != nullptr);
BaseObject* baseObject = dynamic_cast<BaseObject*>(object);
- EXPECT_TRUE(baseObject != NULL);
+ EXPECT_TRUE(baseObject != nullptr);
delete object;
// don't delete factory - it remains in the identifier
}
Modified: code/branches/cpp11_v2/test/core/object/ContextTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/ContextTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/ContextTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -11,7 +11,7 @@
class SubclassContext : public OrxonoxClass, public Context
{
public:
- SubclassContext() : Context(NULL) { RegisterObject(SubclassContext); }
+ SubclassContext() : Context(nullptr) { RegisterObject(SubclassContext); }
};
RegisterClassNoArgs(SubclassContext);
@@ -24,7 +24,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
@@ -38,7 +38,7 @@
TEST_F(ContextTest, CanCreateContext)
{
- Context context(NULL);
+ Context context(nullptr);
}
TEST_F(ContextTest, CanCreateSubclassContext)
@@ -48,7 +48,7 @@
TEST_F(ContextTest, ContextIsItsOwnContext)
{
- Context context(NULL);
+ Context context(nullptr);
EXPECT_EQ(&context, context.getContext());
}
@@ -67,14 +67,14 @@
TEST_F(ContextTest, ContextIsAddedToItsOwnObjectList)
{
- Context context(NULL);
+ Context context(nullptr);
ASSERT_EQ(1u, context.getObjectList<Context>()->size());
EXPECT_TRUE(context.getObjectList<Context>()->begin()->objectBase_ == static_cast<Listable*>(&context));
}
TEST_F(ContextTest, ContextIsAddedToObjectListOfBaseContext)
{
- Context baseContext(NULL);
+ Context baseContext(nullptr);
Context subContext(&baseContext);
ASSERT_EQ(1u, subContext.getObjectList<Context>()->size());
Modified: code/branches/cpp11_v2/test/core/object/DestroyableTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/DestroyableTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/DestroyableTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -31,7 +31,7 @@
bool destroyed = false;
DestroyableTest* test = new DestroyableTest(destroyed);
EXPECT_FALSE(destroyed);
- EXPECT_TRUE(test != NULL);
+ EXPECT_TRUE(test != nullptr);
test->destroy();
EXPECT_TRUE(destroyed);
}
Modified: code/branches/cpp11_v2/test/core/object/IteratorTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/IteratorTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/IteratorTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -35,7 +35,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
@@ -119,7 +119,7 @@
{
++i;
if (i == 1u) EXPECT_EQ(&testClass, *it);
- if (i == 2u) EXPECT_EQ(NULL, *it);
+ if (i == 2u) EXPECT_EQ(nullptr, *it);
}
EXPECT_EQ(2u, i);
}
Modified: code/branches/cpp11_v2/test/core/object/ListableTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/ListableTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/ListableTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -40,7 +40,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
@@ -55,7 +55,7 @@
TEST_F(ListableTest, CanCreate)
{
ListableClassTest* test = new ListableClassTest();
- ASSERT_TRUE(test != NULL);
+ ASSERT_TRUE(test != nullptr);
delete test;
}
@@ -103,7 +103,7 @@
TEST_F(ListableTest, CanAddObjectToContext)
{
- Context context(NULL);
+ Context context(nullptr);
ListableSubclassTest test;
test.setContext(&context);
@@ -117,7 +117,7 @@
TEST_F(ListableTest, CanAddObjectToSubContext)
{
- Context baseContext(NULL);
+ Context baseContext(nullptr);
Context subContext(&baseContext);
ListableSubclassTest test;
@@ -138,7 +138,7 @@
TEST_F(ListableTest, CanChangeContext)
{
Context* rootContext = Context::getRootContext();
- Context newContext(NULL);
+ Context newContext(nullptr);
ListableSubclassTest test;
// object is in root context
Modified: code/branches/cpp11_v2/test/core/object/ObjectListBaseTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/ObjectListBaseTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/ObjectListBaseTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -23,7 +23,7 @@
TEST(ObjectListBaseTest, CanAddElement)
{
ObjectListBase list;
- ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+ ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
list.addElement(element);
EXPECT_EQ(1u, list.size());
}
@@ -31,7 +31,7 @@
TEST(ObjectListBaseTest, CanRemoveElement)
{
ObjectListBase list;
- ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+ ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
list.addElement(element);
EXPECT_EQ(1u, list.size());
list.removeElement(element);
@@ -42,7 +42,7 @@
TEST(ObjectListBaseTest, CanAddObject)
{
ObjectListBase list;
- list.addElement(new ObjectListElement<Listable>(NULL));
+ list.addElement(new ObjectListElement<Listable>(nullptr));
EXPECT_EQ(1u, list.size());
}
@@ -51,15 +51,15 @@
ObjectListBase list;
EXPECT_EQ(0u, list.size());
{
- ObjectListElement<Listable> element1(NULL);
+ ObjectListElement<Listable> element1(nullptr);
list.addElement(&element1);
EXPECT_EQ(1u, list.size());
{
- ObjectListElement<Listable> element1(NULL);
+ ObjectListElement<Listable> element1(nullptr);
list.addElement(&element1);
EXPECT_EQ(2u, list.size());
{
- ObjectListElement<Listable> element1(NULL);
+ ObjectListElement<Listable> element1(nullptr);
list.addElement(&element1);
EXPECT_EQ(3u, list.size());
}
@@ -75,7 +75,7 @@
ObjectListBase list;
ObjectListElementRemovalListenerMock listener;
list.registerRemovalListener(&listener);
- ObjectListBaseElement* element = new ObjectListElement<Listable>(NULL);
+ ObjectListBaseElement* element = new ObjectListElement<Listable>(nullptr);
list.addElement(element);
EXPECT_CALL(listener, removedElement(element));
list.removeElement(element);
Modified: code/branches/cpp11_v2/test/core/object/ObjectListIteratorTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/ObjectListIteratorTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/ObjectListIteratorTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -35,7 +35,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
Modified: code/branches/cpp11_v2/test/core/object/ObjectListTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/ObjectListTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/ObjectListTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -27,7 +27,7 @@
{
new IdentifierManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
Modified: code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -110,10 +110,10 @@
void isNull(const StrongPtr<DestroyableTest> strongPtr)
{
- EXPECT_TRUE(strongPtr == NULL);
+ EXPECT_TRUE(strongPtr == nullptr);
EXPECT_TRUE(strongPtr == 0);
EXPECT_TRUE(!strongPtr);
- EXPECT_FALSE(strongPtr != NULL);
+ EXPECT_FALSE(strongPtr != nullptr);
EXPECT_FALSE(strongPtr != 0);
EXPECT_FALSE(strongPtr);
}
@@ -125,12 +125,12 @@
isNull(strongPtr);
}
{
- StrongPtr<DestroyableTest> strongPtr = NULL;
+ StrongPtr<DestroyableTest> strongPtr = nullptr;
isNull(strongPtr);
}
{
StrongPtr<DestroyableTest> strongPtr;
- strongPtr = NULL;
+ strongPtr = nullptr;
isNull(strongPtr);
}
{
@@ -149,10 +149,10 @@
bool destroyed = false;
DestroyableTest* test = new DestroyableTest(destroyed);
StrongPtr<DestroyableTest> strongPtr = test;
- EXPECT_FALSE(strongPtr == NULL);
+ EXPECT_FALSE(strongPtr == nullptr);
EXPECT_FALSE(strongPtr == 0);
EXPECT_FALSE(!strongPtr);
- EXPECT_TRUE(strongPtr != NULL);
+ EXPECT_TRUE(strongPtr != nullptr);
EXPECT_TRUE(strongPtr != 0);
EXPECT_TRUE(strongPtr);
test->destroy();
@@ -165,7 +165,7 @@
// default
StrongPtr<DestroyableTest> strongPtr1;
- EXPECT_EQ(NULL, strongPtr1.get());
+ EXPECT_EQ(nullptr, strongPtr1.get());
// pointer
StrongPtr<DestroyableTest> strongPtr2a = test;
@@ -276,7 +276,7 @@
EXPECT_EQ(test, strongPtr.get());
EXPECT_EQ(1u, test->getReferenceCount());
strongPtr.reset();
- EXPECT_EQ(NULL, strongPtr.get());
+ EXPECT_EQ(nullptr, strongPtr.get());
EXPECT_EQ(0u, test->getReferenceCount());
test->destroy();
Modified: code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -35,7 +35,7 @@
WeakPtr<DestroyableTest> weakPtr = test;
EXPECT_EQ(test, weakPtr.get());
test->destroy();
- EXPECT_EQ(NULL, weakPtr.get());
+ EXPECT_EQ(nullptr, weakPtr.get());
}
TEST(WeakPtrTest, CanHaveMultiplePointers)
@@ -48,9 +48,9 @@
EXPECT_EQ(test, weakPtr2.get());
EXPECT_EQ(test, weakPtr3.get());
test->destroy();
- EXPECT_EQ(NULL, weakPtr1.get());
- EXPECT_EQ(NULL, weakPtr2.get());
- EXPECT_EQ(NULL, weakPtr3.get());
+ EXPECT_EQ(nullptr, weakPtr1.get());
+ EXPECT_EQ(nullptr, weakPtr2.get());
+ EXPECT_EQ(nullptr, weakPtr3.get());
}
TEST(WeakPtrTest, DestroyCallsCallback)
@@ -65,10 +65,10 @@
void isNull(const WeakPtr<DestroyableTest> weakPtr)
{
- EXPECT_TRUE(weakPtr == NULL);
+ EXPECT_TRUE(weakPtr == nullptr);
EXPECT_TRUE(weakPtr == 0);
EXPECT_TRUE(!weakPtr);
- EXPECT_FALSE(weakPtr != NULL);
+ EXPECT_FALSE(weakPtr != nullptr);
EXPECT_FALSE(weakPtr != 0);
EXPECT_FALSE(weakPtr);
}
@@ -80,12 +80,12 @@
isNull(weakPtr);
}
{
- WeakPtr<DestroyableTest> weakPtr = NULL;
+ WeakPtr<DestroyableTest> weakPtr = nullptr;
isNull(weakPtr);
}
{
WeakPtr<DestroyableTest> weakPtr;
- weakPtr = NULL;
+ weakPtr = nullptr;
isNull(weakPtr);
}
{
@@ -103,10 +103,10 @@
{
DestroyableTest* test = new DestroyableTest();
WeakPtr<DestroyableTest> weakPtr = test;
- EXPECT_FALSE(weakPtr == NULL);
+ EXPECT_FALSE(weakPtr == nullptr);
EXPECT_FALSE(weakPtr == 0);
EXPECT_FALSE(!weakPtr);
- EXPECT_TRUE(weakPtr != NULL);
+ EXPECT_TRUE(weakPtr != nullptr);
EXPECT_TRUE(weakPtr != 0);
EXPECT_TRUE(weakPtr);
test->destroy();
@@ -118,7 +118,7 @@
// default
WeakPtr<DestroyableTest> weakPtr1;
- EXPECT_EQ(NULL, weakPtr1.get());
+ EXPECT_EQ(nullptr, weakPtr1.get());
// pointer
WeakPtr<DestroyableTest> weakPtr2a = test;
@@ -190,9 +190,9 @@
test->destroy();
- EXPECT_EQ(NULL, vector[0].get());
- EXPECT_EQ(NULL, vector[1].get());
- EXPECT_EQ(NULL, vector[2].get());
+ EXPECT_EQ(nullptr, vector[0].get());
+ EXPECT_EQ(nullptr, vector[1].get());
+ EXPECT_EQ(nullptr, vector[2].get());
}
TEST(WeakPtrTest, TestReset)
@@ -201,7 +201,7 @@
WeakPtr<DestroyableTest> weakPtr(test);
EXPECT_EQ(test, weakPtr.get());
weakPtr.reset();
- EXPECT_EQ(NULL, weakPtr.get());
+ EXPECT_EQ(nullptr, weakPtr.get());
test->destroy();
}
Modified: code/branches/cpp11_v2/test/core/singleton/ScopeTest.cc
===================================================================
--- code/branches/cpp11_v2/test/core/singleton/ScopeTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/core/singleton/ScopeTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -31,7 +31,7 @@
new ScopeManager();
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::SCOPED_SINGLETON_WRAPPER);
- Context::setRootContext(new Context(NULL));
+ Context::setRootContext(new Context(nullptr));
}
virtual void TearDown()
Modified: code/branches/cpp11_v2/test/util/SharedPtrTest.cc
===================================================================
--- code/branches/cpp11_v2/test/util/SharedPtrTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/util/SharedPtrTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -191,7 +191,7 @@
// default
SharedPtr<TestChildClass> sharedPtr1;
- EXPECT_EQ(NULL, sharedPtr1.get());
+ EXPECT_EQ(nullptr, sharedPtr1.get());
// pointer
SharedPtr<TestChildClass> sharedPtr2(pointer);
@@ -220,7 +220,7 @@
// default
SharedPtr<TestChildClass> sharedPtr1;
- EXPECT_EQ(NULL, sharedPtr1.get());
+ EXPECT_EQ(nullptr, sharedPtr1.get());
// pointer
SharedPtr<TestChildClass> sharedPtr2 = pointer;
Modified: code/branches/cpp11_v2/test/util/SingletonTest.cc
===================================================================
--- code/branches/cpp11_v2/test/util/SingletonTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/util/SingletonTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -22,7 +22,7 @@
static TestSingleton* singletonPtr_s;
};
- TestSingleton* TestSingleton::singletonPtr_s = NULL;
+ TestSingleton* TestSingleton::singletonPtr_s = nullptr;
const size_t TestSingleton::MAGIC_VALUE = 0xCAFEBABE;
}
Modified: code/branches/cpp11_v2/test/util/output/ConsoleWriterTest.cc
===================================================================
--- code/branches/cpp11_v2/test/util/output/ConsoleWriterTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/util/output/ConsoleWriterTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -26,7 +26,7 @@
TEST_F(ConsoleWriterTest, Disable)
{
- std::ostream stream(NULL);
+ std::ostream stream(nullptr);
EXPECT_EQ(0U, OutputManager::getInstance().getListeners().size());
ConsoleWriter writer(stream);
EXPECT_EQ(1U, OutputManager::getInstance().getListeners().size());
@@ -36,7 +36,7 @@
TEST_F(ConsoleWriterTest, Enable)
{
- std::ostream stream(NULL);
+ std::ostream stream(nullptr);
ConsoleWriter writer(stream);
writer.disable();
EXPECT_EQ(0U, OutputManager::getInstance().getListeners().size());
Modified: code/branches/cpp11_v2/test/util/output/OutputManagerTest.cc
===================================================================
--- code/branches/cpp11_v2/test/util/output/OutputManagerTest.cc 2015-11-04 15:07:46 UTC (rev 10764)
+++ code/branches/cpp11_v2/test/util/output/OutputManagerTest.cc 2015-11-04 21:25:42 UTC (rev 10765)
@@ -53,17 +53,17 @@
// test getInstance does not create listeners
TEST(OutputManagerTest, GetInstanceDoesNotCreateDefaultListeners)
{
- EXPECT_TRUE(NULL == OutputManager::getInstance().getMemoryWriter());
- EXPECT_TRUE(NULL == OutputManager::getInstance().getConsoleWriter());
- EXPECT_TRUE(NULL == OutputManager::getInstance().getLogWriter());
+ EXPECT_TRUE(nullptr == OutputManager::getInstance().getMemoryWriter());
+ EXPECT_TRUE(nullptr == OutputManager::getInstance().getConsoleWriter());
+ EXPECT_TRUE(nullptr == OutputManager::getInstance().getLogWriter());
}
// test getInstanceAndCreateListeners creates listeners
TEST(OutputManagerTest, GetInstanceAndCreateListenersCreatesDefaultListeners)
{
- EXPECT_TRUE(NULL != OutputManager::getInstanceAndCreateListeners().getMemoryWriter());
- EXPECT_TRUE(NULL != OutputManager::getInstanceAndCreateListeners().getConsoleWriter());
- EXPECT_TRUE(NULL != OutputManager::getInstanceAndCreateListeners().getLogWriter());
+ EXPECT_TRUE(nullptr != OutputManager::getInstanceAndCreateListeners().getMemoryWriter());
+ EXPECT_TRUE(nullptr != OutputManager::getInstanceAndCreateListeners().getConsoleWriter());
+ EXPECT_TRUE(nullptr != OutputManager::getInstanceAndCreateListeners().getLogWriter());
}
// test getInstanceAndCreateListeners called again does not re-create listeners
More information about the Orxonox-commit
mailing list