Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee committed Jan 11, 2022
1 parent 2a9e88f commit a801264
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/graph/util/ExpressionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,12 @@ Expression *ExpressionUtils::rewriteRelExpr(const Expression *expr) {

// If the arithExpr has constant expr as member that is a string, do not rewrite
if (lExpr->kind() == Expression::Kind::kConstant) {
if (static_cast<ConstantExpression *>(lExpr)->eval(ctx).isStr()) {
if (lExpr->eval(ctx).isStr()) {
return false;
}
}
if (rExpr->kind() == Expression::Kind::kConstant) {
if (static_cast<ConstantExpression *>(rExpr)->eval(ctx).isStr()) {
if (rExpr->eval(ctx).isStr()) {
return false;
}
}
Expand All @@ -453,7 +453,9 @@ Expression *ExpressionUtils::rewriteRelExpr(const Expression *expr) {
auto relExpr = static_cast<const RelationalExpression *>(e);
// Check right operand
bool checkRightOperand = isEvaluableExpr(relExpr->right());
if (!checkRightOperand) return false;
if (!checkRightOperand) {
return false;
}

// Check left operand
bool checkLeftOperand = false;
Expand Down

0 comments on commit a801264

Please sign in to comment.