From f0ec022bd08e02ff176a9f029eb3551915b30b55 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 4 Oct 2020 08:40:20 +0300 Subject: Fix build with GCC 8.3.0 - CheckOpCode takes an int, otherwise it will always return true --- JSImpl/src/ByteCodeGenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'JSImpl/src/ByteCodeGenerator.cpp') diff --git a/JSImpl/src/ByteCodeGenerator.cpp b/JSImpl/src/ByteCodeGenerator.cpp index fd85326..39f3bff 100644 --- a/JSImpl/src/ByteCodeGenerator.cpp +++ b/JSImpl/src/ByteCodeGenerator.cpp @@ -97,7 +97,7 @@ private: void PushConst(double c); IPLString CreateRegister(); - bool CheckOpCode(Instruction::Type opcode) { return opcode >= Instruction::Type::FIRST && opcode <= Instruction::Type::LAST; } + bool CheckOpCode(int opcode) { return opcode >= Instruction::Type::FIRST && opcode <= Instruction::Type::LAST; } private: IPLVector m_RegisterTable; IPLVector m_Code; @@ -678,4 +678,4 @@ IPLString GenerateByteCode(ExpressionPtr program, const IPLString& source, const program->Accept(generator); return generator.GetCode(); -} \ No newline at end of file +} -- cgit v1.3.1-23-gd82d