Replace SourceHook list usages in tf with AMTL.
This commit is contained in:
parent
6c37a5d9f3
commit
975fc93e1f
@ -36,17 +36,15 @@ RegNatives g_RegNatives;
|
|||||||
|
|
||||||
void RegNatives::Register(ICallWrapper *pWrapper)
|
void RegNatives::Register(ICallWrapper *pWrapper)
|
||||||
{
|
{
|
||||||
m_List.push_back(pWrapper);
|
m_Natives.append(pWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegNatives::UnregisterAll()
|
void RegNatives::UnregisterAll()
|
||||||
{
|
{
|
||||||
SourceHook::List<ICallWrapper *>::iterator iter;
|
for (size_t iter = 0; iter < m_Natives.length(); ++iter)
|
||||||
|
|
||||||
for (iter=m_List.begin(); iter!=m_List.end(); iter++)
|
|
||||||
{
|
{
|
||||||
(*iter)->Destroy();
|
m_Natives[iter]->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_List.clear();
|
m_Natives.clear();
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#ifndef _INCLUDE_TF2TOOLS_REGNATIVES_H_
|
#ifndef _INCLUDE_TF2TOOLS_REGNATIVES_H_
|
||||||
#define _INCLUDE_TF2TOOLS_REGNATIVES_H_
|
#define _INCLUDE_TF2TOOLS_REGNATIVES_H_
|
||||||
|
|
||||||
#include <sh_list.h>
|
#include <am-vector.h>
|
||||||
|
|
||||||
class RegNatives
|
class RegNatives
|
||||||
{
|
{
|
||||||
@ -40,7 +40,7 @@ public:
|
|||||||
void Register(ICallWrapper *pWrapper);
|
void Register(ICallWrapper *pWrapper);
|
||||||
void UnregisterAll();
|
void UnregisterAll();
|
||||||
private:
|
private:
|
||||||
SourceHook::List<ICallWrapper *> m_List;
|
ke::Vector<ICallWrapper *> m_Natives;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern RegNatives g_RegNatives;
|
extern RegNatives g_RegNatives;
|
||||||
|
Loading…
Reference in New Issue
Block a user