[Orxonox-commit 431] r3012 - branches/weapons/src/orxonox/objects/weaponsystem

rgrieder at orxonox.net rgrieder at orxonox.net
Thu May 21 20:17:33 CEST 2009


Author: rgrieder
Date: 2009-05-21 20:17:33 +0200 (Thu, 21 May 2009)
New Revision: 3012

Modified:
   branches/weapons/src/orxonox/objects/weaponsystem/WeaponSystem.cc
Log:
Build fix: Member functions marked as const should only iterate over member containers with constant iterators.

Modified: branches/weapons/src/orxonox/objects/weaponsystem/WeaponSystem.cc
===================================================================
--- branches/weapons/src/orxonox/objects/weaponsystem/WeaponSystem.cc	2009-05-21 17:14:05 UTC (rev 3011)
+++ branches/weapons/src/orxonox/objects/weaponsystem/WeaponSystem.cc	2009-05-21 18:17:33 UTC (rev 3012)
@@ -227,7 +227,7 @@
     WeaponPack * WeaponSystem::getWeaponPack(unsigned int index) const
     {
         unsigned int i = 0;
-        for (std::set<WeaponPack*>::iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)
+        for (std::set<WeaponPack*>::const_iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)
         {
             ++i;
             if (i > index)




More information about the Orxonox-commit mailing list