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

macro processor: c++ modernization

parent fa2f6c92
Branches
Tags
No related merge requests found
...@@ -43,8 +43,7 @@ Environment::define(FunctionPtr func, ExpressionPtr value) ...@@ -43,8 +43,7 @@ Environment::define(FunctionPtr func, ExpressionPtr value)
ExpressionPtr ExpressionPtr
Environment::getVariable(const string &name) const Environment::getVariable(const string &name) const
{ {
auto it = variables.find(name); if (auto it = variables.find(name); it != variables.end())
if (it != variables.end())
return it->second; return it->second;
if (!parent) if (!parent)
...@@ -56,8 +55,7 @@ Environment::getVariable(const string &name) const ...@@ -56,8 +55,7 @@ Environment::getVariable(const string &name) const
tuple<FunctionPtr, ExpressionPtr> tuple<FunctionPtr, ExpressionPtr>
Environment::getFunction(const string &name) const Environment::getFunction(const string &name) const
{ {
auto it = functions.find(name); if (auto it = functions.find(name); it != functions.end())
if (it != functions.end())
return it->second; return it->second;
if (!parent) if (!parent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment