Changeset 10733
- Timestamp:
- Oct 31, 2015, 6:11:53 PM (9 years ago)
- Location:
- code/branches/cpp11_v2
- Files:
-
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2
- Property svn:mergeinfo changed
/code/branches/cpp11 (added) merged: 10439-10441,10443,10545
- Property svn:mergeinfo changed
-
code/branches/cpp11_v2/cmake/CompilerConfigGCC.cmake
r9686 r10733 64 64 ADD_COMPILER_FLAGS("-Os" MinSizeRel CACHE) 65 65 66 # Introducing c++11 67 # Note: there is also 'std=gnu++11', but that might not be portable to windows 68 ADD_COMPILER_FLAGS("-std=c++0x" CACHE) 69 66 70 # CMake doesn't seem to set the PIC flags right on certain 64 bit systems 67 71 IF(NOT MINGW AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") -
code/branches/cpp11_v2/src/external/ois/linux/LinuxJoyStickEvents.cpp
r8351 r10733 34 34 #include <cassert> 35 35 #include <linux/input.h> 36 36 #include <unistd.h> 37 37 38 38 #include <sstream> -
code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc
r10624 r10733 35 35 36 36 #include <boost/filesystem.hpp> 37 38 #include <iterator> 39 #include <algorithm> 37 40 38 41 #include "util/Convert.h" … … 93 96 try 94 97 { 95 boost::filesystem::copy_file(defaultFilepath, filepath); 98 std::ifstream input(defaultFilepath.string().c_str(), std::ifstream::in | std::ifstream::binary); 99 std::ofstream output(filepath.string().c_str(), std::ofstream::out | std::ofstream::binary); 100 copy(std::istreambuf_iterator<char>(input), std::istreambuf_iterator<char>(), std::ostream_iterator<char>(output)); 96 101 orxout(internal_info, context::config) << "Copied " << this->filename_ << " from the default config folder." << endl; 97 102 } -
code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.h
r9667 r10733 93 93 } 94 94 95 operator T*() 96 { 97 return object_; 98 } 99 95 100 T* object_; //!< The object 96 101 }; -
code/branches/cpp11_v2/src/libraries/tools/BulletDebugDrawer.h
r10277 r10733 13 13 #include <btBulletCollisionCommon.h> 14 14 #include <OgreFrameListener.h> 15 #include <OgreVector3.h> 16 #include <OgreColourValue.h> 15 17 16 18 namespace orxonox -
code/branches/cpp11_v2/src/libraries/tools/OgreBulletUtils.h
r10262 r10733 10 10 11 11 #include "tools/ToolsPrereqs.h" 12 #include <OgreVector3.h> 13 #include <OgreQuaternion.h> 14 #include <OgreColourValue.h> 15 #include <OgreMatrix3.h> 16 #include <OgreMatrix4.h> 12 17 13 18 namespace orxonox … … 42 47 inline Ogre::Matrix3 matrix3(const btMatrix3x3& matrix) 43 48 { 44 return Matrix3(49 return Ogre::Matrix3( 45 50 matrix[0][0], matrix[0][1], matrix[0][2], 46 51 matrix[1][0], matrix[1][1], matrix[1][2], -
code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.h
r7401 r10733 77 77 #include "UtilPrereqs.h" 78 78 #include <vector> 79 #include <cstdio> 79 80 80 81 namespace orxonox -
code/branches/cpp11_v2/src/modules/invader/Invader.cc
r10624 r10733 129 129 } 130 130 131 void Invader::setCenterpoint(InvaderCenterPoint* center) 132 { 133 this->center_ = center; 134 } 135 131 136 void Invader::costLife() 132 137 { -
code/branches/cpp11_v2/src/modules/invader/Invader.h
r10624 r10733 39 39 40 40 #include "gametypes/Deathmatch.h" 41 42 #include "InvaderCenterPoint.h"43 44 41 #include "tools/Timer.h" 45 42 … … 58 55 void spawnEnemy(); 59 56 60 void setCenterpoint(InvaderCenterPoint* center) 61 { this->center_ = center; } 57 void setCenterpoint(InvaderCenterPoint* center); 62 58 63 59 int getLives(){return this->lives;} -
code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.cc
r10625 r10733 32 32 */ 33 33 34 #include "invader/InvaderPrereqs.h"35 34 #include "InvaderEnemy.h" 35 36 #include "core/CoreIncludes.h" 37 #include "Invader.h" 36 38 #include "InvaderShip.h" 37 39 -
code/branches/cpp11_v2/src/modules/invader/InvaderEnemy.h
r10625 r10733 37 37 #include "invader/InvaderPrereqs.h" 38 38 39 #include "worldentities/pawns/ SpaceShip.h"39 #include "worldentities/pawns/Pawn.h" 40 40 41 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/invader/InvaderEnemyShooter.cc
r10628 r10733 32 32 */ 33 33 34 #include "invader/InvaderPrereqs.h"35 34 #include "InvaderEnemyShooter.h" 36 // #include "worldentities/pawns/SpaceShip.h" 35 36 #include "core/CoreIncludes.h" 37 #include "core/command/Executor.h" 38 #include "Invader.h" 39 #include "InvaderShip.h" 37 40 38 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/invader/InvaderHUDinfo.cc
r10624 r10733 30 30 #include "core/XMLPort.h" 31 31 #include "util/Convert.h" 32 //#include "Invader.h"32 #include "Invader.h" 33 33 34 34 namespace orxonox -
code/branches/cpp11_v2/src/modules/invader/InvaderShip.cc
r10624 r10733 37 37 #include "core/XMLPort.h" 38 38 #include "Invader.h" 39 #include "InvaderEnemy.h" 40 #include "graphics/Camera.h" 41 #include "weapons/projectiles/Projectile.h" 39 42 40 43 namespace orxonox … … 139 142 isFireing = bBoost; 140 143 } 144 void InvaderShip::rotateRoll(const Vector2& value) 145 { 146 if (getGame()) 147 if (getGame()->bEndGame) 148 getGame()->end(); 149 } 141 150 inline bool InvaderShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 142 151 { -
code/branches/cpp11_v2/src/modules/invader/InvaderShip.h
r10624 r10733 37 37 #include "invader/InvaderPrereqs.h" 38 38 39 #include "weapons/WeaponsPrereqs.h" 39 40 #include "worldentities/pawns/SpaceShip.h" 40 #include "graphics/Camera.h"41 #include "weapons/projectiles/Projectile.h"42 41 43 42 namespace orxonox … … 61 60 virtual void rotatePitch(const Vector2& value){}; 62 61 //return to main menu if game has ended. 63 virtual void rotateRoll(const Vector2& value) {if (getGame()) if (getGame()->bEndGame) getGame()->end();};62 virtual void rotateRoll(const Vector2& value); 64 63 65 64 virtual void updateLevel(); -
code/branches/cpp11_v2/src/modules/invader/InvaderWeapon.h
r9943 r10733 35 35 #define _InvaderWeapon_H__ 36 36 37 #include "invader/InvaderPrereqs.h" 38 39 #include "weapons/WeaponsPrereqs.h" 37 40 #include "weapons/weaponmodes/HsW01.h" 38 #include "weapons/WeaponsPrereqs.h"39 40 #include "tools/Timer.h"41 41 42 42 namespace orxonox -
code/branches/cpp11_v2/src/modules/invader/InvaderWeaponEnemy.cc
r9945 r10733 34 34 #include "InvaderWeaponEnemy.h" 35 35 36 #include "core/CoreIncludes.h" 37 #include "weapons/projectiles/Projectile.h" 38 36 39 namespace orxonox 37 40 { -
code/branches/cpp11_v2/src/modules/invader/InvaderWeaponEnemy.h
r9943 r10733 35 35 #define _InvaderWeaponEnemy_H__ 36 36 37 // #include "weapons/weaponmodes/HsW01.h"38 // #include "weapons/WeaponsPrereqs.h" 39 #include " invader/InvaderWeapon.h"37 #include "invader/InvaderPrereqs.h" 38 39 #include "InvaderWeapon.h" 40 40 #include "tools/Timer.h" 41 41 -
code/branches/cpp11_v2/src/modules/jump/Jump.cc
r10262 r10733 34 34 #include "Jump.h" 35 35 #include "core/CoreIncludes.h" 36 #include "core/EventIncludes.h" 37 #include "core/command/Executor.h" 38 #include "core/config/ConfigValueIncludes.h" 39 #include "gamestates/GSLevel.h" 40 #include "chat/ChatManager.h" 36 41 37 #include "JumpCenterpoint.h" 42 38 #include "JumpPlatform.h" … … 56 52 #include "JumpBoots.h" 57 53 #include "JumpShield.h" 54 55 #include "gamestates/GSLevel.h" 58 56 #include "infos/PlayerInfo.h" 57 #include "graphics/Camera.h" 59 58 60 59 namespace orxonox … … 70 69 camera = 0; 71 70 setHUDTemplate("JumpHUD"); 72 73 setConfigValues();74 71 } 75 72 … … 1300 1297 return figure_->dead_; 1301 1298 } 1299 1300 void Jump::setCenterpoint(JumpCenterpoint* center) 1301 { 1302 center_ = center; 1303 } 1304 1302 1305 } -
code/branches/cpp11_v2/src/modules/jump/Jump.h
r10262 r10733 31 31 32 32 #include "jump/JumpPrereqs.h" 33 #include "tools/Timer.h"34 #include "graphics/Camera.h"35 33 #include "gametypes/Deathmatch.h" 36 #include "JumpCenterpoint.h"37 #include <list>38 34 39 35 namespace orxonox … … 51 47 float getFuel() const; 52 48 bool getDead(PlayerInfo* player) const; 53 void setCenterpoint(JumpCenterpoint* center) 54 { center_ = center; } 49 void setCenterpoint(JumpCenterpoint* center); 55 50 PlayerInfo* getPlayer() const; 56 51 -
code/branches/cpp11_v2/src/modules/jump/JumpBoots.cc
r10262 r10733 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/GameMode.h" 38 #include "graphics/Model.h" 39 #include "gametypes/Gametype.h" 40 37 #include "core/XMLPort.h" 41 38 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 39 46 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpBoots.h
r10262 r10733 30 30 #define _JumpBoots_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 #include "util/Math.h" 34 #include "worldentities/MovableEntity.h" 35 32 #include "JumpPrereqs.h" 33 #include "JumpItem.h" 36 34 37 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.cc
r10624 r10733 33 33 34 34 #include "JumpCenterpoint.h" 35 35 36 #include "core/CoreIncludes.h" 36 37 #include "core/XMLPort.h" -
code/branches/cpp11_v2/src/modules/jump/JumpCenterpoint.h
r10624 r10733 31 31 32 32 #include "jump/JumpPrereqs.h" 33 34 #include <string>35 36 #include <util/Math.h>37 38 33 #include "worldentities/StaticEntity.h" 39 34 -
code/branches/cpp11_v2/src/modules/jump/JumpEnemy.cc
r10624 r10733 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/GameMode.h" 38 #include "graphics/Model.h" 39 #include "gametypes/Gametype.h" 40 37 #include "core/XMLPort.h" 41 38 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 39 46 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpEnemy.h
r10624 r10733 37 37 38 38 #include "jump/JumpPrereqs.h" 39 40 #include "util/Math.h"41 42 39 #include "worldentities/MovableEntity.h" 43 44 40 45 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpFigure.cc
r10262 r10733 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 #include "graphics/Model.h" 39 #include "JumpRocket.h" 40 #include "JumpPropeller.h" 41 #include "JumpBoots.h" 42 #include "JumpShield.h" 38 43 39 44 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpItem.cc
r10624 r10733 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/GameMode.h" 38 #include "graphics/Model.h" 39 #include "gametypes/Gametype.h" 40 37 #include "core/XMLPort.h" 41 38 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 39 46 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpItem.h
r10624 r10733 37 37 38 38 #include "jump/JumpPrereqs.h" 39 40 #include "util/Math.h"41 42 39 #include "worldentities/MovableEntity.h" 43 40 -
code/branches/cpp11_v2/src/modules/jump/JumpPlatform.cc
r10632 r10733 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/GameMode.h" 38 #include "graphics/Model.h" 39 #include "gametypes/Gametype.h" 40 38 #include "core/XMLPort.h" 39 #include "sound/WorldSound.h" 41 40 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 41 46 42 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatform.h
r10632 r10733 36 36 #define _JumpPlatform_H__ 37 37 38 #include "jump/JumpPrereqs.h" 39 #include "util/Math.h" 38 #include "JumpPrereqs.h" 40 39 #include "worldentities/MovableEntity.h" 41 40 -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformDisappear.cc
r10262 r10733 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/GameMode.h" 38 39 #include "gametypes/Gametype.h" 40 37 #include "core/XMLPort.h" 41 38 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 39 46 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformDisappear.h
r10262 r10733 36 36 #define _JumpPlatformDisappear_H__ 37 37 38 #include "jump/JumpPrereqs.h" 39 #include "util/Math.h" 40 #include "worldentities/MovableEntity.h" 38 #include "JumpPrereqs.h" 39 #include "JumpPlatform.h" 41 40 42 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformFake.cc
r10262 r10733 33 33 34 34 #include "JumpPlatformFake.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h"37 #include "gametypes/Gametype.h"38 #include "JumpFigure.h"39 #include "sound/WorldSound.h"40 37 #include "core/XMLPort.h" 41 38 -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformFake.h
r10262 r10733 36 36 #define _JumpPlatformFake_H__ 37 37 38 #include "jump/JumpPrereqs.h" 39 40 #include "util/Math.h" 41 42 #include "worldentities/MovableEntity.h" 43 38 #include "JumpPrereqs.h" 39 #include "JumpPlatform.h" 44 40 45 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformHMove.cc
r10262 r10733 33 33 34 34 #include "JumpPlatformHMove.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 37 #include "gametypes/Gametype.h" 37 #include "core/XMLPort.h" 38 38 #include "JumpFigure.h" 39 #include "sound/WorldSound.h"40 #include "core/XMLPort.h"41 39 42 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformHMove.h
r10262 r10733 30 30 #define _JumpPlatformHMove_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 34 #include "util/Math.h" 35 36 #include "worldentities/MovableEntity.h" 37 32 #include "JumpPrereqs.h" 33 #include "JumpPlatform.h" 38 34 39 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformStatic.cc
r10262 r10733 33 33 34 34 #include "JumpPlatformStatic.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 37 #include "gametypes/Gametype.h" 37 #include "core/XMLPort.h" 38 38 #include "JumpFigure.h" 39 #include "sound/WorldSound.h"40 #include "core/XMLPort.h"41 39 42 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformStatic.h
r10262 r10733 30 30 #define _JumpPlatformStatic_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 34 #include "util/Math.h" 35 36 #include "worldentities/MovableEntity.h" 37 32 #include "JumpPrereqs.h" 33 #include "JumpPlatform.h" 38 34 39 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.cc
r10262 r10733 33 33 34 34 #include "JumpPlatformTimer.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/ GameMode.h"37 #include "g ametypes/Gametype.h"37 #include "core/XMLPort.h" 38 #include "graphics/ParticleSpawner.h" 38 39 #include "JumpFigure.h" 39 #include "sound/WorldSound.h"40 #include "core/XMLPort.h"41 40 42 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformTimer.h
r10262 r10733 36 36 #define _JumpPlatformTimer_H__ 37 37 38 #include "jump/JumpPrereqs.h" 39 40 #include "util/Math.h" 41 42 #include "worldentities/MovableEntity.h" 43 #include "graphics/ParticleSpawner.h" 44 38 #include "JumpPrereqs.h" 39 #include "JumpPlatform.h" 45 40 46 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformVMove.cc
r10262 r10733 33 33 34 34 #include "JumpPlatformVMove.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 37 #include "gametypes/Gametype.h" 37 #include "core/XMLPort.h" 38 38 #include "JumpFigure.h" 39 #include "sound/WorldSound.h"40 #include "core/XMLPort.h"41 39 42 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPlatformVMove.h
r10262 r10733 30 30 #define _JumpPlatformVMove_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 #include "util/Math.h" 34 #include "worldentities/MovableEntity.h" 32 #include "JumpPrereqs.h" 33 #include "JumpPlatform.h" 35 34 36 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpProjectile.cc
r10624 r10733 33 33 34 34 #include "JumpProjectile.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 37 #include "graphics/Model.h" 38 #include "gametypes/Gametype.h" 37 #include "core/XMLPort.h" 39 38 #include "JumpFigure.h" 40 #include "sound/WorldSound.h" 41 #include "core/XMLPort.h" 39 #include "JumpEnemy.h" 42 40 43 41 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPropeller.cc
r10262 r10733 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/GameMode.h" 38 #include "graphics/Model.h" 39 #include "gametypes/Gametype.h" 40 37 #include "core/XMLPort.h" 41 38 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 39 46 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpPropeller.h
r10262 r10733 30 30 #define _JumpPropeller_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 34 #include "util/Math.h" 35 36 #include "worldentities/MovableEntity.h" 37 32 #include "JumpPrereqs.h" 33 #include "JumpItem.h" 38 34 39 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpRocket.cc
r10262 r10733 33 33 34 34 #include "JumpRocket.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 37 #include "graphics/Model.h" 38 #include "gametypes/Gametype.h" 37 #include "core/XMLPort.h" 39 38 #include "JumpFigure.h" 40 #include "sound/WorldSound.h"41 #include "core/XMLPort.h"42 39 43 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpRocket.h
r10262 r10733 30 30 #define _JumpRocket_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 #include "util/Math.h" 34 #include "worldentities/MovableEntity.h" 32 #include "JumpPrereqs.h" 33 #include "JumpItem.h" 35 34 36 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpScore.cc
r10624 r10733 33 33 34 34 #include "JumpScore.h" 35 35 36 #include "core/CoreIncludes.h" 36 37 #include "core/XMLPort.h" … … 38 39 #include "infos/PlayerInfo.h" 39 40 #include "Jump.h" 40 #include "sound/WorldSound.h"41 41 42 42 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpShield.cc
r10262 r10733 35 35 36 36 #include "core/CoreIncludes.h" 37 #include "core/GameMode.h" 38 #include "graphics/Model.h" 39 #include "gametypes/Gametype.h" 40 37 #include "core/XMLPort.h" 41 38 #include "JumpFigure.h" 42 43 #include "sound/WorldSound.h"44 #include "core/XMLPort.h"45 39 46 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpShield.h
r10262 r10733 30 30 #define _JumpShield_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 34 #include "util/Math.h" 35 36 #include "worldentities/MovableEntity.h" 37 32 #include "JumpPrereqs.h" 33 #include "JumpItem.h" 38 34 39 35 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpSpring.cc
r10262 r10733 33 33 34 34 #include "JumpSpring.h" 35 35 36 #include "core/CoreIncludes.h" 36 #include "core/GameMode.h" 37 #include "graphics/Model.h" 38 #include "gametypes/Gametype.h" 37 #include "core/XMLPort.h" 39 38 #include "JumpFigure.h" 40 #include "sound/WorldSound.h"41 #include "core/XMLPort.h"42 39 43 40 namespace orxonox -
code/branches/cpp11_v2/src/modules/jump/JumpSpring.h
r10262 r10733 30 30 #define _JumpSpring_H__ 31 31 32 #include "jump/JumpPrereqs.h" 33 34 #include "util/Math.h" 35 36 #include "worldentities/MovableEntity.h" 37 32 #include "JumpPrereqs.h" 33 #include "JumpItem.h" 38 34 39 35 namespace orxonox -
code/branches/cpp11_v2/src/orxonox/chat/ChatManager.cc
r10624 r10733 107 107 108 108 // notify all listeners 109 for ( ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)110 it->incomingChat(text, name);109 for (ChatListener* listener : ObjectList<ChatListener>()) 110 listener->incomingChat(text, name); 111 111 } 112 112 -
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc
r10631 r10733 207 207 void ArtificialController::setAllBotLevel(float level) 208 208 { 209 for ( ObjectList<ArtificialController>::iterator it = ObjectList<ArtificialController>::begin(); it != ObjectList<ArtificialController>::end(); ++it)210 it->setBotLevel(level);209 for (ArtificialController* controller : ObjectList<ArtificialController>()) 210 controller->setBotLevel(level); 211 211 } 212 212 … … 231 231 int ArtificialController::getFiremode(std::string name) 232 232 { 233 for ( std::map< std::string, int >::iterator it = this->weaponModes_.begin(); it != this->weaponModes_.end(); ++it)234 { 235 if ( it->first == name)236 return it->second;233 for (auto firemode : this->weaponModes_) 234 { 235 if (firemode.first == name) 236 return firemode.second; 237 237 } 238 238 return -1; … … 259 259 { 260 260 WorldEntity* waypoint = NULL; 261 for ( ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)262 { 263 if( (*it)->getIdentifier() == ClassByString(name))261 for (WorldEntity* we : ObjectList<WorldEntity>()) 262 { 263 if(we->getIdentifier() == ClassByString(name)) 264 264 { 265 265 ControllableEntity* controllable = this->getControllableEntity(); 266 266 if(!controllable) continue; 267 float actualDistance = ( (*it)->getPosition() - controllable->getPosition() ).length();267 float actualDistance = ( we->getPosition() - controllable->getPosition() ).length(); 268 268 if(actualDistance > searchDistance || actualDistance < 5.0f) continue; 269 269 // TODO: PickupSpawner: adjust waypoint accuracy to PickupSpawner's triggerdistance … … 271 271 else 272 272 { 273 waypoint = *it;273 waypoint = we; 274 274 break; 275 275 }
Note: See TracChangeset
for help on using the changeset viewer.