From 214f0db4db45234179aa64beb42c3863e90f02f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 6 Dec 2021 12:58:48 +0100
Subject: [PATCH] Add comment about predetermined variables and equations
 marked [static]

By the way, also perform a small code simplification.
---
 src/DynamicModel.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc
index b32617c5..90a1d1f6 100644
--- a/src/DynamicModel.cc
+++ b/src/DynamicModel.cc
@@ -5541,10 +5541,11 @@ DynamicModel::transformPredeterminedVariables()
 
   for (auto &equation : equations)
     {
-      auto substeq = dynamic_cast<BinaryOpNode *>(equation->decreaseLeadsLagsPredeterminedVariables());
-      assert(substeq);
-      equation = substeq;
+      equation = dynamic_cast<BinaryOpNode *>(equation->decreaseLeadsLagsPredeterminedVariables());
+      assert(equation);
     }
+
+  // No need to handle static_only_equations, since there are no leads/lags there
 }
 
 void
-- 
GitLab