From 8cf06b2865a0d1e624b7ed5fe8e9c0bb0bab0464 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sun, 16 Oct 2022 10:06:26 -0500 Subject: [PATCH] Fixed GCC error in ivscript.h --- sp/src/public/vscript/ivscript.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sp/src/public/vscript/ivscript.h b/sp/src/public/vscript/ivscript.h index 0d105d55..7d4ed0ea 100644 --- a/sp/src/public/vscript/ivscript.h +++ b/sp/src/public/vscript/ivscript.h @@ -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.