diff --git a/core/logic/ForwardSys.cpp b/core/logic/ForwardSys.cpp index d5280548..9b50f882 100644 --- a/core/logic/ForwardSys.cpp +++ b/core/logic/ForwardSys.cpp @@ -34,6 +34,8 @@ #include #include +using namespace ke; + CForwardManager g_Forwards; // Genesis turns to its source, reduction occurs stepwise although the essence @@ -58,7 +60,7 @@ IForward *CForwardManager::CreateForward(const char *name, ExecType et, unsigned { scripts->AddFunctionsToForward(name, fwd); - m_managed.push_back(fwd); + m_managed.append(fwd); } return fwd; @@ -75,7 +77,7 @@ IChangeableForward *CForwardManager::CreateForwardEx(const char *name, ExecType if (fwd) { - m_unmanaged.push_back(fwd); + m_unmanaged.append(fwd); } return fwd; @@ -615,7 +617,7 @@ bool CForward::RemoveFunction(IPluginContext *pContext, funcid_t index) bool CForward::RemoveFunction(IPluginFunction *func) { bool found = false; - List *lst; + LinkedList *lst; if (func->IsRunnable()) lst = &m_functions; @@ -667,16 +669,16 @@ bool CForward::AddFunction(IPluginFunction *func) return false; if (func->IsRunnable()) - m_functions.push_back(func); + m_functions.append(func); else - m_paused.push_back(func); + m_paused.append(func); return true; } bool CForward::IsFunctionRegistered(IPluginFunction *func) { - List *lst; + LinkedList *lst; if (func->IsRunnable()) lst = &m_functions; else @@ -696,7 +698,7 @@ const char *CForward::GetForwardName() unsigned int CForward::GetFunctionCount() { - return m_functions.size(); + return m_functions.length(); } ExecType CForward::GetExecType() diff --git a/core/logic/ForwardSys.h b/core/logic/ForwardSys.h index bada7c27..cbda008b 100644 --- a/core/logic/ForwardSys.h +++ b/core/logic/ForwardSys.h @@ -31,12 +31,10 @@ #include #include #include "common_logic.h" -#include +#include #include "ISourceMod.h" -using namespace SourceHook; - -typedef List::iterator FuncIter; +typedef ke::LinkedList::iterator FuncIter; /* :TODO: a global name max define for sourcepawn, should mirror compiler's sNAMEMAX */ #define FORWARDS_NAME_MAX 64 @@ -129,8 +127,8 @@ protected: /* :TODO: I want a caching list type here. * Destroying these things and using new/delete for their members feels bad. */ - mutable List m_functions; - mutable List m_paused; + mutable ke::LinkedList m_functions; + mutable ke::LinkedList m_paused; FuncIteratorGuard *m_IterGuard; /* Type and name information */ @@ -172,8 +170,8 @@ public: //IPluginsListener public: //SMGlobalClass void OnSourceModAllInitialized(); private: - List m_managed; - List m_unmanaged; + ke::LinkedList m_managed; + ke::LinkedList m_unmanaged; }; extern CForwardManager g_Forwards;