From e736b9234f10f5ac44dcd7abfde7fe1efb27fe33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 7 Oct 2020 17:15:53 +0200
Subject: [PATCH] Minor simplification

---
 src/ExprNode.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 6de8f844..da5b3625 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -3819,6 +3819,7 @@ BinaryOpNode::composeDerivatives(expr_t darg1, expr_t darg2)
     case BinaryOpcode::plus:
       return datatree.AddPlus(darg1, darg2);
     case BinaryOpcode::minus:
+    case BinaryOpcode::equal:
       return datatree.AddMinus(darg1, darg2);
     case BinaryOpcode::times:
       t11 = datatree.AddTimes(darg1, arg2);
@@ -3909,8 +3910,6 @@ BinaryOpNode::composeDerivatives(expr_t darg1, expr_t darg2)
       t13 = datatree.AddMinus(datatree.One, t11);
       t14 = datatree.AddTimes(t13, darg2);
       return datatree.AddPlus(t14, t12);
-    case BinaryOpcode::equal:
-      return datatree.AddMinus(darg1, darg2);
     }
   // Suppress GCC warning
   exit(EXIT_FAILURE);
-- 
GitLab