mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 22:55:41 +03:00
player.h: fix ForEachItem()
items iteration
This commit is contained in:
parent
667242fadd
commit
da24c74c20
@ -650,10 +650,11 @@ public:
|
||||
auto item = m_rgpPlayerItems[slot];
|
||||
while (item)
|
||||
{
|
||||
auto next = item->m_pNext;
|
||||
if (func(static_cast<T *>(item)))
|
||||
return static_cast<T *>(item);
|
||||
|
||||
item = item->m_pNext;
|
||||
item = next;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@ -666,10 +667,11 @@ public:
|
||||
{
|
||||
while (item)
|
||||
{
|
||||
auto next = item->m_pNext;
|
||||
if (func(static_cast<T *>(item)))
|
||||
return static_cast<T *>(item);
|
||||
|
||||
item = item->m_pNext;
|
||||
item = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user