[8727] Cleanup in ObjectAccessor::FindHelper.

* This commit also restores compilability under some platforms and gcc combinations.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-10-25 00:53:51 +02:00
parent 54a9c6c225
commit b078ceb76c
2 changed files with 5 additions and 7 deletions

View file

@ -134,15 +134,13 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
// in that case linking/delinking other map should be guarded
template <class OBJECT> static OBJECT* FindHelper(uint64 guid)
{
OBJECT* ret = NULL;
std::list<Map*>::const_iterator i = i_mapList.begin();
while (i != i_mapList.end() && !ret)
for (std::list<Map*>::const_iterator i = i_mapList.begin() ; i != i_mapList.end(); ++i)
{
ret = (*i)->GetObjectsStore().find<OBJECT>(guid, (OBJECT*)NULL);
++i;
if (OBJECT* ret = (*i)->GetObjectsStore().find(guid, (OBJECT*)NULL))
return ret;
}
return ret;
return NULL;
}
static std::list<Map*> i_mapList;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8726"
#define REVISION_NR "8727"
#endif // __REVISION_NR_H__