diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-12-09 10:23:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-09 10:23:21 +0100 |
commit | 0c5d3b838c935e6121bcee57b83fa802d7058cc1 (patch) | |
tree | de206bf06d4f6fb280a427a2a907de93f0043bed /core/math | |
parent | e5e1277ecd08f1f2980c9cd0490fb932efaa4678 (diff) | |
parent | 644f73966002589c36d779fa33b9524a451f56e0 (diff) |
Merge pull request #44199 from bruvzg/pvs_fixes_1
PVS-Studio static analyzer fixes
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/expression.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/core/math/expression.cpp b/core/math/expression.cpp index d1f15caa5e..29b706a3a9 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -1003,31 +1003,19 @@ Expression::ENode *Expression::_parse_expression() { priority = 1; unary = true; break; - case Variant::OP_MULTIPLY: - priority = 2; - break; case Variant::OP_DIVIDE: - priority = 2; - break; case Variant::OP_MODULE: priority = 2; break; - case Variant::OP_ADD: - priority = 3; - break; case Variant::OP_SUBTRACT: priority = 3; break; - case Variant::OP_SHIFT_LEFT: - priority = 4; - break; case Variant::OP_SHIFT_RIGHT: priority = 4; break; - case Variant::OP_BIT_AND: priority = 5; break; @@ -1037,31 +1025,17 @@ Expression::ENode *Expression::_parse_expression() { case Variant::OP_BIT_OR: priority = 7; break; - case Variant::OP_LESS: - priority = 8; - break; case Variant::OP_LESS_EQUAL: - priority = 8; - break; case Variant::OP_GREATER: - priority = 8; - break; case Variant::OP_GREATER_EQUAL: - priority = 8; - break; - case Variant::OP_EQUAL: - priority = 8; - break; case Variant::OP_NOT_EQUAL: priority = 8; break; - case Variant::OP_IN: priority = 10; break; - case Variant::OP_NOT: priority = 11; unary = true; @@ -1072,7 +1046,6 @@ Expression::ENode *Expression::_parse_expression() { case Variant::OP_OR: priority = 13; break; - default: { _set_error("Parser bug, invalid operator in expression: " + itos(expression[i].op)); return nullptr; |