From b078ceb76c622ef27305028bb59e096976ad34ae Mon Sep 17 00:00:00 2001 From: ApoC Date: Sun, 25 Oct 2009 00:53:51 +0200 Subject: [PATCH] [8727] Cleanup in ObjectAccessor::FindHelper. * This commit also restores compilability under some platforms and gcc combinations. Signed-off-by: ApoC --- src/game/ObjectAccessor.h | 10 ++++------ src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/game/ObjectAccessor.h b/src/game/ObjectAccessor.h index 9c58222f4..8377724a8 100644 --- a/src/game/ObjectAccessor.h +++ b/src/game/ObjectAccessor.h @@ -134,15 +134,13 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton static OBJECT* FindHelper(uint64 guid) { - OBJECT* ret = NULL; - std::list::const_iterator i = i_mapList.begin(); - while (i != i_mapList.end() && !ret) + for (std::list::const_iterator i = i_mapList.begin() ; i != i_mapList.end(); ++i) { - ret = (*i)->GetObjectsStore().find(guid, (OBJECT*)NULL); - ++i; + if (OBJECT* ret = (*i)->GetObjectsStore().find(guid, (OBJECT*)NULL)) + return ret; } - return ret; + return NULL; } static std::list i_mapList; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index d3e17c0da..246d7dc20 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8726" + #define REVISION_NR "8727" #endif // __REVISION_NR_H__