Skip to content
Snippets Groups Projects
Verified Commit 4540bed0 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

macro processor: missed if statement with initializer for C++17

parent 4e3bf094
No related branches found
No related tags found
No related merge requests found
Pipeline #2432 passed
......@@ -41,13 +41,11 @@ Bool::is_equal(const BaseTypePtr &btp) const
BoolPtr
Bool::logical_and(const BaseTypePtr &btp) const
{
auto btp2 = dynamic_pointer_cast<Bool>(btp);
if (btp2)
if (auto btp2 = dynamic_pointer_cast<Bool>(btp); btp2)
return make_shared<Bool>(value && *btp2, env);
auto btp3 = dynamic_pointer_cast<Real>(btp);
if (btp3)
return make_shared<Bool>(value && *btp3, env);
if (auto btp2 = dynamic_pointer_cast<Real>(btp); btp2)
return make_shared<Bool>(value && *btp2, env);
throw StackTrace("Type mismatch for operands of && operator");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment