Fixed GCC error in ivscript.h

This commit is contained in:
Blixibon 2022-10-16 10:06:26 -05:00
parent 2ca2d7c80f
commit 8cf06b2865

View File

@ -1605,6 +1605,10 @@ typedef CScriptScopeT<> CScriptScope;
#define FOR_EACH_VEC_PTR( vecName, iteratorName ) \
for ( int iteratorName = 0; iteratorName < (vecName)->Count(); iteratorName++ )
//-----------------------------------------------------------------------------
static void __UpdateScriptHooks( HSCRIPT hooksList );
//-----------------------------------------------------------------------------
//
// Keeps track of which events and scopes are hooked without polling this from the script VM on each request.
@ -1654,12 +1658,6 @@ public:
return scopeMap->Find( g_pScriptVM->HScriptToRaw( hScope ) ) != scopeMap->InvalidIndex();
}
static void __UpdateScriptHooks( HSCRIPT hooksList )
{
extern CScriptHookManager &GetScriptHookManager();
GetScriptHookManager().Update( hooksList );
}
//
// On VM init, registers script func and caches the hook func.
//
@ -1876,6 +1874,11 @@ inline CScriptHookManager &GetScriptHookManager()
return g_ScriptHookManager;
}
static void __UpdateScriptHooks( HSCRIPT hooksList )
{
GetScriptHookManager().Update( hooksList );
}
//-----------------------------------------------------------------------------
// Function bindings allow script functions to run C++ functions.