Remove the forward cache and simplify CForward construction.

This commit is contained in:
David Anderson
2015-09-21 01:07:01 -07:00
parent dcc192ee0d
commit 632c7d05dd
2 changed files with 30 additions and 66 deletions
+3 -7
View File
@@ -32,7 +32,6 @@
#include <IPluginSys.h>
#include "common_logic.h"
#include <sh_list.h>
#include <sh_stack.h>
#include "ISourceMod.h"
using namespace SourceHook;
@@ -116,6 +115,9 @@ public:
va_list ap);
bool IsFunctionRegistered(IPluginFunction *func);
private:
CForward(ExecType et, const char *name,
const ParamType *types, unsigned num_params);
void _Int_PushArray(cell_t *inarray, unsigned int cells, int flags);
void _Int_PushString(cell_t *inarray, unsigned int cells, int sz_flags, int cp_flags);
inline int SetError(int err)
@@ -150,8 +152,6 @@ class CForwardManager :
public SMGlobalClass
{
friend class CForward;
public:
~CForwardManager();
public: //IForwardManager
IForward *CreateForward(const char *name,
ExecType et,
@@ -171,11 +171,7 @@ public: //IPluginsListener
void OnPluginPauseChange(IPlugin *plugin, bool paused);
public: //SMGlobalClass
void OnSourceModAllInitialized();
protected:
CForward *ForwardMake();
void ForwardFree(CForward *fwd);
private:
CStack<CForward *> m_FreeForwards;
List<CForward *> m_managed;
List<CForward *> m_unmanaged;
};