From d64317a64fcee4a72f6463473c9360e6637f5f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Thu, 2 Mar 2023 14:46:59 +0100 Subject: [PATCH] Minor simplification --- src/ExprNode.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ExprNode.cc b/src/ExprNode.cc index c8e4c4b3..1da16358 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -868,7 +868,7 @@ VariableNode::prepareForDerivation() case SymbolType::trend: case SymbolType::logTrend: // In static models, exogenous and trends do not have deriv IDs - if (dynamic_cast<StaticModel *>(&datatree)) + if (!datatree.isDynamic()) break; [[fallthrough]]; case SymbolType::endogenous: @@ -907,7 +907,7 @@ VariableNode::computeDerivative(int deriv_id) case SymbolType::trend: case SymbolType::logTrend: // In static models, exogenous and trends do not have deriv IDs - if (dynamic_cast<StaticModel *>(&datatree)) + if (!datatree.isDynamic()) return datatree.Zero; [[fallthrough]]; case SymbolType::endogenous: @@ -1431,7 +1431,7 @@ VariableNode::computeChainRuleDerivative(int deriv_id, case SymbolType::trend: case SymbolType::logTrend: // In static models, exogenous and trends do not have deriv IDs - if (dynamic_cast<StaticModel *>(&datatree)) + if (!datatree.isDynamic()) return datatree.Zero; [[fallthrough]]; case SymbolType::endogenous: -- GitLab