From de11b9e901d1d1caa0634fad541f08f11c5781af Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 29 Apr 2009 00:26:07 -0500 Subject: [7730] Some optimizantion and code style. Author: zhenya --HG-- branch : trunk --- src/game/GameObject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game/GameObject.cpp') diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 3fcf8a02722..b7043de99f1 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -386,8 +386,8 @@ void GameObject::Update(uint32 /*p_time*/) if(spellId) { - std::set::iterator it = m_unique_users.begin(); - std::set::iterator end = m_unique_users.end(); + std::set::const_iterator it = m_unique_users.begin(); + std::set::const_iterator end = m_unique_users.end(); for (; it != end; it++) { Unit* owner = Unit::GetUnit(*this, uint64(*it)); @@ -962,7 +962,7 @@ void GameObject::Use(Unit* user) // every slot will be on that straight line float orthogonalOrientation = GetOrientation()+M_PI*0.5f; // find nearest slot - for(uint32 i=0; ichair.slots; i++) + for(uint32 i=0; ichair.slots; ++i) { // the distance between this slot and the center of the go - imagine a 1D space float relativeDistance = (info->size*i)-(info->size*(info->chair.slots-1)/2.0f); -- cgit v1.2.3