mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 10:28:34 +00:00
Remove -Wno-switch and fix up SDKHooks / SDKTools to compile.
This commit is contained in:
parent
bf6f9624ee
commit
a9465b1fa1
@ -201,8 +201,6 @@ class SMConfig(object):
|
||||
'-Wall',
|
||||
'-Werror',
|
||||
'-Wno-unused',
|
||||
'-Wno-switch',
|
||||
'-Wno-array-bounds',
|
||||
'-msse',
|
||||
'-m32',
|
||||
'-fvisibility=hidden',
|
||||
|
||||
@ -724,6 +724,9 @@ HookReturn SDKHooks::Hook(int entity, SDKHookType type, IPluginFunction *callbac
|
||||
case SDKHook_CanBeAutobalanced:
|
||||
hookid = SH_ADD_MANUALVPHOOK(CanBeAutobalanced, pEnt, SH_MEMBER(&g_Interface, &SDKHooks::Hook_CanBeAutobalanced), false);
|
||||
break;
|
||||
case SDKHook_MAXHOOKS:
|
||||
// This is checked up above.
|
||||
break;
|
||||
}
|
||||
|
||||
vhook.SetHookID(hookid);
|
||||
|
||||
@ -47,6 +47,8 @@ cell_t Native_Hook(IPluginContext *pContext, const cell_t *params)
|
||||
HookReturn ret = g_Interface.Hook(entity, type, callback);
|
||||
switch (ret)
|
||||
{
|
||||
case HookRet_Successful:
|
||||
break;
|
||||
case HookRet_InvalidEntity:
|
||||
pContext->ThrowNativeError("Entity %d is invalid", entity);
|
||||
break;
|
||||
|
||||
@ -364,6 +364,9 @@ static cell_t SDKCall(IPluginContext *pContext, const cell_t *params)
|
||||
startparam++;
|
||||
}
|
||||
break;
|
||||
case ValveCall_Static:
|
||||
// This should never happen as we require a thisptr to get here.
|
||||
return pContext->ThrowNativeError("Internal consistency error: static call with thisptr");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -273,9 +273,9 @@ DataStatus EncodeValveParam(IPluginContext *pContext,
|
||||
|
||||
return Data_Okay;
|
||||
}
|
||||
default:
|
||||
return Data_Fail;
|
||||
}
|
||||
|
||||
return Data_Fail;
|
||||
}
|
||||
|
||||
DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user