Replace SourceHook list usages in cstrike with AMTL.

This commit is contained in:
Kyle Sanderson 2014-06-04 17:36:28 -07:00
parent 7b59b7f384
commit 6c37a5d9f3
2 changed files with 7 additions and 9 deletions

View File

@ -36,17 +36,15 @@ RegNatives g_RegNatives;
void RegNatives::Register(ICallWrapper *pWrapper)
{
m_List.push_back(pWrapper);
m_Natives.append(pWrapper);
}
void RegNatives::UnregisterAll()
{
SourceHook::List<ICallWrapper *>::iterator iter;
for (iter=m_List.begin(); iter!=m_List.end(); iter++)
for (size_t iter = 0; iter < m_Natives.length(); ++iter)
{
(*iter)->Destroy();
m_Natives[iter]->Destroy();
}
m_List.clear();
m_Natives.clear();
}

View File

@ -32,7 +32,7 @@
#ifndef _INCLUDE_CSTRIKE_REGNATIVES_H_
#define _INCLUDE_CSTRIKE_REGNATIVES_H_
#include <sh_list.h>
#include "am-vector.h"
class RegNatives
{
@ -40,7 +40,7 @@ public:
void Register(ICallWrapper *pWrapper);
void UnregisterAll();
private:
SourceHook::List<ICallWrapper *> m_List;
ke::Vector<ICallWrapper *> m_Natives;
};
extern RegNatives g_RegNatives;