Strip sourcehook containers (#2578)

This commit is contained in:
Benoist
2026-09-17 20:56:47 -04:00
committed by GitHub
parent 3723860af3
commit 82cd96aef6
94 changed files with 512 additions and 671 deletions
+3 -7
View File
@@ -49,7 +49,7 @@ unsigned int CNativeOwner::GetMarkSerial()
void CNativeOwner::AddDependent(CPlugin *pPlugin)
{
if (m_Dependents.find(pPlugin) == m_Dependents.end())
if (std::find(m_Dependents.begin(), m_Dependents.end(), pPlugin) == m_Dependents.end())
m_Dependents.push_back(pPlugin);
}
@@ -78,10 +78,8 @@ void CNativeOwner::UnbindWeakRef(const WeakNative &ref)
void CNativeOwner::DropEverything()
{
List<WeakNative>::iterator iter;
/* Unbind and remove all weak references to us */
iter = m_WeakRefs.begin();
auto iter = m_WeakRefs.begin();
while (iter != m_WeakRefs.end())
{
UnbindWeakRef((*iter));
@@ -103,9 +101,7 @@ void CNativeOwner::DropEverything()
void CNativeOwner::DropWeakRefsTo(CPlugin *pPlugin)
{
List<WeakNative>::iterator iter;
iter = m_WeakRefs.begin();
auto iter = m_WeakRefs.begin();
while (iter != m_WeakRefs.end())
{
WeakNative & ref = (*iter);