From 93ef4c6febaff596d4593f06f1499a7315811074 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Tue, 5 Jul 2022 16:38:16 +0200
Subject: [PATCH] Small simplification

---
 src/ModelTree.cc | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 8d8df52b..8a4f7b89 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -1331,14 +1331,13 @@ ModelTree::writeModelEquations(ostream &output, ExprNodeOutputType output_type,
   for (int eq = 0; eq < static_cast<int>(equations.size()); eq++)
     {
       BinaryOpNode *eq_node = equations[eq];
-      expr_t lhs = eq_node->arg1;
-      expr_t rhs = eq_node->arg2;
+      expr_t lhs = eq_node->arg1, rhs = eq_node->arg2;
 
       // Test if the right hand side of the equation is empty.
       double vrhs = 1.0;
       try
         {
-          vrhs = rhs->eval(eval_context_t());
+          vrhs = rhs->eval({});
         }
       catch (ExprNode::EvalException &e)
         {
@@ -1389,14 +1388,13 @@ ModelTree::writeBytecodeModelEquations(BytecodeWriter &code_file, bool dynamic,
   for (int eq = 0; eq < static_cast<int>(equations.size()); eq++)
     {
       BinaryOpNode *eq_node = equations[eq];
-      expr_t lhs = eq_node->arg1;
-      expr_t rhs = eq_node->arg2;
+      expr_t lhs = eq_node->arg1, rhs = eq_node->arg2;
       code_file << FNUMEXPR_{ExpressionType::ModelEquation, eq};
       // Test if the right hand side of the equation is empty.
       double vrhs = 1.0;
       try
         {
-          vrhs = rhs->eval(eval_context_t());
+          vrhs = rhs->eval({});
         }
       catch (ExprNode::EvalException &e)
         {
-- 
GitLab