Commit 302fec4d authored by Houtan Bastani's avatar Houtan Bastani

remove comparisons to nullptr

parent 02ae0af3
Pipeline #688 passed with stage
in 1 minute and 36 seconds
......@@ -5833,9 +5833,9 @@ void
BinaryOpNode::findConstantEquations(map<VariableNode *, NumConstNode *> &table) const
{
if (op_code == BinaryOpcode::equal)
if (dynamic_cast<VariableNode *>(arg1) != nullptr && dynamic_cast<NumConstNode *>(arg2) != nullptr)
if (dynamic_cast<VariableNode *>(arg1) && dynamic_cast<NumConstNode *>(arg2))
table[dynamic_cast<VariableNode *>(arg1)] = dynamic_cast<NumConstNode *>(arg2);
else if (dynamic_cast<VariableNode *>(arg2) != nullptr && dynamic_cast<NumConstNode *>(arg1) != nullptr)
else if (dynamic_cast<VariableNode *>(arg2) && dynamic_cast<NumConstNode *>(arg1))
table[dynamic_cast<VariableNode *>(arg2)] = dynamic_cast<NumConstNode *>(arg1);
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment