diff options
| Commit | f0ec022bd08e02ff176a9f029eb3551915b30b55 (patch) | |
|---|---|---|
| Author | 2020-10-04 08:40:20 +0300 | |
| Committer | 2020-10-05 22:13:47 +0300 | |
| Files | 864446b8a5d7f11bc45d75a2f26de32739be28ad /JSImpl/src | |
| IPL-f0ec022bd08e02ff176a9f029eb3551915b30b55.tar IPL-f0ec022bd08e02ff176a9f029eb3551915b30b55.tar.gz IPL-f0ec022bd08e02ff176a9f029eb3551915b30b55.zip | ||
| Parent | 615397eb2c179787e23867e86907113d7c169c88 (diff) | |
Fix build with GCC 8.3.0
- CheckOpCode takes an int, otherwise it will always return true
2 files changed, 4 insertions, 3 deletions
| -rw-r--r-- | JSImpl/src/ByteCodeGenerator.cpp | 4 | ||||
| -rw-r--r-- | JSImpl/src/JSONParser.cpp | 3 |
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<IPLString> m_RegisterTable;
IPLVector<Instruction> 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 +}
diff --git a/JSImpl/src/JSONParser.cpp b/JSImpl/src/JSONParser.cpp index 13ad9d6..275fb0e 100644 --- a/JSImpl/src/JSONParser.cpp +++ b/JSImpl/src/JSONParser.cpp @@ -3,6 +3,7 @@ #include <unordered_map> #include <cstdlib> +#include <cstring> void SkipWhitespaces(const char*& json) { @@ -71,7 +72,7 @@ ExpressionPtr JSONParseWrap(const char*& json, const char* eName) template <> \ ExpressionPtr JSONParseWrap<ClassName##Type>(const char*& json, const char* eName) \ { \ - auto ptr = IPLMakeSharePtr<::##ClassName>(); \ + auto ptr = IPLMakeSharePtr<::ClassName>(); \ int membersCount = 0, currentVisitCount = 0; \ (void)currentVisitCount; \ json += strlen("{"); \ |
