Changeset 10769 for code/branches/cpp11_v2/src/orxonox
- Timestamp:
- Nov 7, 2015, 10:23:42 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.h
r9667 r10769 89 89 90 90 //WAYPOINT DATA 91 std::vector<WeakPtr<WorldEntity> 91 std::vector<WeakPtr<WorldEntity>> waypoints_; 92 92 size_t currentWaypoint_; 93 93 float squaredaccuracy_; -
code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.h
r10624 r10769 99 99 Controller* controller_; 100 100 ControllableEntity* controllableEntity_; 101 std::vector< WeakPtr<ControllableEntity>> previousControllableEntity_; //!< List of the previous ControllableEntities if repeatedly startTemporary control was called. The ControllableEntity at the back is the most recent.101 std::vector<WeakPtr<ControllableEntity>> previousControllableEntity_; //!< List of the previous ControllableEntities if repeatedly startTemporary control was called. The ControllableEntity at the back is the most recent. 102 102 unsigned int controllableEntityID_; 103 103 -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10768 r10769 62 62 OverlayGroup::~OverlayGroup() 63 63 { 64 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)64 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 65 65 (*it)->destroy(); 66 66 this->hudElements_.clear(); … … 86 86 void OverlayGroup::setScale(const Vector2& scale) 87 87 { 88 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)88 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 89 89 (*it)->scale(scale / this->scale_); 90 90 this->scale_ = scale; … … 94 94 void OverlayGroup::setScroll(const Vector2& scroll) 95 95 { 96 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)96 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 97 97 (*it)->scroll(scroll - this->scroll_); 98 98 this->scroll_ = scroll; … … 133 133 if (index < this->hudElements_.size()) 134 134 { 135 std::set< StrongPtr<OrxonoxOverlay>>::const_iterator it = hudElements_.begin();135 std::set<StrongPtr<OrxonoxOverlay>>::const_iterator it = hudElements_.begin(); 136 136 for (unsigned int i = 0; i != index; ++it, ++i) 137 137 ; … … 147 147 SUPER( OverlayGroup, changedVisibility ); 148 148 149 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)149 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 150 150 (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed 151 151 } … … 155 155 this->owner_ = owner; 156 156 157 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)157 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 158 158 (*it)->setOwner(owner); 159 159 } -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.h
r10624 r10769 65 65 static void scrollGroup(const std::string& name, const Vector2& scroll); 66 66 67 inline const std::set< StrongPtr<OrxonoxOverlay>>& getOverlays() const67 inline const std::set<StrongPtr<OrxonoxOverlay>>& getOverlays() const 68 68 { return this->hudElements_; } 69 69 … … 91 91 92 92 private: 93 std::set< StrongPtr<OrxonoxOverlay>> hudElements_; //!< Contains all the OrxonoxOverlays of the this group.93 std::set<StrongPtr<OrxonoxOverlay>> hudElements_; //!< Contains all the OrxonoxOverlays of the this group. 94 94 Vector2 scale_; //!< Current scale (independent of the elements). 95 95 Vector2 scroll_; //!< Current scrolling offset. -
code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc
r10765 r10769 39 39 namespace orxonox 40 40 { 41 SoundBuffer::SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer> 41 SoundBuffer::SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer>>::iterator poolIterator) 42 42 : filename_(filename) 43 43 , audioBuffer_(AL_NONE) -
code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.h
r10624 r10769 64 64 65 65 private: 66 SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer> 66 SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer>>::iterator poolIterator); 67 67 #if !defined(_MSC_VER) || _MSC_VER >= 1500 68 68 ~SoundBuffer(); … … 73 73 std::string filename_; 74 74 ALuint audioBuffer_; 75 std::list<shared_ptr<SoundBuffer> 75 std::list<shared_ptr<SoundBuffer>>::iterator poolIterator_; 76 76 }; 77 77 } -
code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc
r10765 r10769 422 422 { 423 423 // If we're already fading out --> remove that 424 for (std::list<StrongPtr<AmbientSound> 424 for (std::list<StrongPtr<AmbientSound>>::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++) 425 425 { 426 426 if (*it == sound) … … 438 438 { 439 439 // If we're already fading in --> remove that 440 for (std::list<StrongPtr<AmbientSound> 440 for (std::list<StrongPtr<AmbientSound>>::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++) 441 441 { 442 442 if (*it == sound) … … 461 461 462 462 // FADE IN 463 for (std::list<StrongPtr<AmbientSound> 463 for (std::list<StrongPtr<AmbientSound>>::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); ) 464 464 { 465 465 if ((*it)->getVolume() + this->crossFadeStep_*dt > 1.0f) … … 476 476 477 477 // FADE OUT 478 for (std::list<StrongPtr<AmbientSound> 478 for (std::list<StrongPtr<AmbientSound>>::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); ) 479 479 { 480 480 if ((*it)->getVolume() - this->crossFadeStep_*dt < 0.0f) … … 606 606 #endif 607 607 this->availableSoundSources_.push_back(source); 608 for (std::vector<std::pair<ALuint, BaseSound*> 608 for (std::vector<std::pair<ALuint, BaseSound*>>::iterator it = this->usedSoundSources_.begin(); 609 609 it != this->usedSoundSources_.end(); ++it) 610 610 { -
code/branches/cpp11_v2/src/orxonox/sound/SoundManager.h
r10624 r10769 125 125 126 126 // Ambient sound related 127 typedef std::list<std::pair<AmbientSound*, bool> 127 typedef std::list<std::pair<AmbientSound*, bool>> AmbientList; 128 128 AmbientList ambientSounds_; 129 129 //! Absolute change per second (0.1 means 10% of the nominal volume) for cross fading 130 130 float crossFadeStep_; 131 std::list<StrongPtr<AmbientSound> 132 std::list<StrongPtr<AmbientSound> 131 std::list<StrongPtr<AmbientSound>> fadeInList_; 132 std::list<StrongPtr<AmbientSound>> fadeOutList_; 133 133 134 134 // Volume related … … 139 139 static const unsigned int maxEffectsPoolSize_s = 40 * 1024 * 1024; 140 140 unsigned int effectsPoolSize_; 141 typedef std::list<shared_ptr<SoundBuffer> 141 typedef std::list<shared_ptr<SoundBuffer>> EffectsPoolList; 142 142 EffectsPoolList effectsPool_; 143 typedef std::map<std::string, shared_ptr<SoundBuffer> 143 typedef std::map<std::string, shared_ptr<SoundBuffer>> SoundBufferMap; 144 144 SoundBufferMap soundBuffers_; 145 145 … … 148 148 unsigned int maxSources_; 149 149 std::vector<ALuint> availableSoundSources_; 150 std::vector<std::pair<ALuint, BaseSound*> 150 std::vector<std::pair<ALuint, BaseSound*>> usedSoundSources_; 151 151 152 152 bool bDestructorCalled_; ///< Becomes true if the destructor is called - used to prevent ambient sounds from registering after the lists were cleared -
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
r10768 r10769 108 108 this->camera_->destroy(); 109 109 110 for (std::list<StrongPtr<CameraPosition> 110 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 111 111 (*it)->destroy(); 112 112 … … 165 165 { 166 166 unsigned int i = 0; 167 for (std::list<StrongPtr<CameraPosition> 167 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 168 168 { 169 169 if (i == index) … … 180 180 181 181 unsigned int counter = 0; 182 for (std::list<StrongPtr<CameraPosition> 182 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 183 183 { 184 184 if ((*it) == this->currentCameraPosition_) … … 219 219 else if (this->cameraPositions_.size() > 0) 220 220 { 221 for (std::list<StrongPtr<CameraPosition> 221 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 222 222 { 223 223 if ((*it) == this->camera_->getParent()) … … 477 477 if (parent) 478 478 { 479 for (std::list<StrongPtr<CameraPosition> 479 for (std::list<StrongPtr<CameraPosition>>::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 480 480 if ((*it)->getIsAbsolute()) 481 481 parent->attach((*it)); -
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.h
r10624 r10769 121 121 void addCameraPosition(CameraPosition* position); 122 122 CameraPosition* getCameraPosition(unsigned int index) const; 123 inline const std::list<StrongPtr<CameraPosition> 123 inline const std::list<StrongPtr<CameraPosition>>& getCameraPositions() const 124 124 { return this->cameraPositions_; } 125 125 unsigned int getCurrentCameraIndex() const; … … 242 242 bool bMouseLook_; 243 243 float mouseLookSpeed_; 244 std::list<StrongPtr<CameraPosition> 244 std::list<StrongPtr<CameraPosition>> cameraPositions_; 245 245 CameraPosition* currentCameraPosition_; 246 246 std::string cameraPositionTemplate_;
Note: See TracChangeset
for help on using the changeset viewer.