DHooks Merge pt2/2

This commit is contained in:
Michael Flaherty 2019-04-20 16:55:55 -07:00 committed by Headline
parent 8fc0e6fd5a
commit 8f568b9e71
2 changed files with 8 additions and 5 deletions

View File

@ -22,7 +22,7 @@ IPluginFunction *GetCallback(IPluginContext *pContext, HookSetup * setup, const
{
IPluginFunction *ret = NULL;
if (params[0] >= callback_index)
if (static_cast<unsigned int>(params[0]) >= callback_index)
{
ret = pContext->GetFunctionById(params[callback_index]);
}
@ -61,7 +61,7 @@ cell_t Native_AddParam(IPluginContext *pContext, const cell_t *params)
return 0;
}
ParamInfo info;
::ParamInfo info;
info.type = (HookParamType)params[2];

View File

@ -3,11 +3,14 @@
#include "extension.h"
#include <sourcehook.h>
#include <sourcehook_pibuilder.h>
#include <sh_vector.h>
#include <macro-assembler.h>
#include <assembler-x86.h>
using namespace sp;
enum MRESReturn
{
MRES_ChangedHandled = -2, // Use changed values and return MRES_Handled
@ -122,7 +125,7 @@ public:
class DHooksInfo
{
public:
SourceHook::CVector<ParamInfo> params;
SourceHook::CVector<::ParamInfo> params;
int offset;
unsigned int returnFlag;
ReturnType returnType;
@ -304,7 +307,7 @@ public:
ReturnType returnType;
HookType hookType;
ThisPointerType thisType;
SourceHook::CVector<ParamInfo> params;
SourceHook::CVector<::ParamInfo> params;
int offset;
IPluginFunction *callback;
};