mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
54a9c6c225
commit
b078ceb76c
2 changed files with 5 additions and 7 deletions
|
|
@ -134,15 +134,13 @@ class MANGOS_DLL_DECL ObjectAccessor : public MaNGOS::Singleton<ObjectAccessor,
|
||||||
// in that case linking/delinking other map should be guarded
|
// in that case linking/delinking other map should be guarded
|
||||||
template <class OBJECT> static OBJECT* FindHelper(uint64 guid)
|
template <class OBJECT> static OBJECT* FindHelper(uint64 guid)
|
||||||
{
|
{
|
||||||
OBJECT* ret = NULL;
|
for (std::list<Map*>::const_iterator i = i_mapList.begin() ; i != i_mapList.end(); ++i)
|
||||||
std::list<Map*>::const_iterator i = i_mapList.begin();
|
|
||||||
while (i != i_mapList.end() && !ret)
|
|
||||||
{
|
{
|
||||||
ret = (*i)->GetObjectsStore().find<OBJECT>(guid, (OBJECT*)NULL);
|
if (OBJECT* ret = (*i)->GetObjectsStore().find(guid, (OBJECT*)NULL))
|
||||||
++i;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::list<Map*> i_mapList;
|
static std::list<Map*> i_mapList;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8726"
|
#define REVISION_NR "8727"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue