Made index of VM intrinsic functions unsigned

No more 'comparison of integers of different signs: int and unsigned long' warning
This commit is contained in:
alexey.lysiuk 2016-02-27 15:14:13 +02:00
parent d49f4a5d84
commit fcb38a9419
2 changed files with 4 additions and 4 deletions

View File

@ -841,7 +841,7 @@ class FxFlopFunctionCall : public FxExpression
public: public:
FxFlopFunctionCall(int index, FArgumentList *args, const FScriptPosition &pos); FxFlopFunctionCall(size_t index, FArgumentList *args, const FScriptPosition &pos);
~FxFlopFunctionCall(); ~FxFlopFunctionCall();
FxExpression *Resolve(FCompileContext&); FxExpression *Resolve(FCompileContext&);
ExpEmit Emit(VMFunctionBuilder *build); ExpEmit Emit(VMFunctionBuilder *build);

View File

@ -3176,7 +3176,7 @@ FxFunctionCall::~FxFunctionCall()
FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) 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) 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) : FxExpression(pos)
{ {
assert(index >= 0 && index < countof(FxFlops) && "FLOP index out of range"); assert(index < countof(FxFlops) && "FLOP index out of range");
Index = index; Index = index;
ArgList = args; ArgList = args;
} }