diff --git a/src/thingdef/thingdef_exp.h b/src/thingdef/thingdef_exp.h index 62640e7e1..daa824264 100644 --- a/src/thingdef/thingdef_exp.h +++ b/src/thingdef/thingdef_exp.h @@ -841,7 +841,7 @@ class FxFlopFunctionCall : public FxExpression public: - FxFlopFunctionCall(int index, FArgumentList *args, const FScriptPosition &pos); + FxFlopFunctionCall(size_t index, FArgumentList *args, const FScriptPosition &pos); ~FxFlopFunctionCall(); FxExpression *Resolve(FCompileContext&); ExpEmit Emit(VMFunctionBuilder *build); diff --git a/src/thingdef/thingdef_expression.cpp b/src/thingdef/thingdef_expression.cpp index 2ac41f7a8..b5b35a770 100644 --- a/src/thingdef/thingdef_expression.cpp +++ b/src/thingdef/thingdef_expression.cpp @@ -3176,7 +3176,7 @@ FxFunctionCall::~FxFunctionCall() FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) { - for (int i = 0; i < countof(FxFlops); ++i) + for (size_t i = 0; i < countof(FxFlops); ++i) { if (MethodName == FxFlops[i].Name) { @@ -3514,10 +3514,10 @@ ExpEmit FxVMFunctionCall::Emit(VMFunctionBuilder *build, bool tailcall) // //========================================================================== -FxFlopFunctionCall::FxFlopFunctionCall(int index, FArgumentList *args, const FScriptPosition &pos) +FxFlopFunctionCall::FxFlopFunctionCall(size_t index, FArgumentList *args, const FScriptPosition &pos) : FxExpression(pos) { - assert(index >= 0 && index < countof(FxFlops) && "FLOP index out of range"); + assert(index < countof(FxFlops) && "FLOP index out of range"); Index = index; ArgList = args; }