From ed31d1cb5eb37f9ce3586c46e96956d50cc7f0a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 21 Jul 2021 15:25:53 +0200
Subject: [PATCH] Remove unused functions

---
 src/DataTree.cc | 40 ----------------------------------------
 src/DataTree.hh |  8 --------
 2 files changed, 48 deletions(-)

diff --git a/src/DataTree.cc b/src/DataTree.cc
index afa52880..4fb897fd 100644
--- a/src/DataTree.cc
+++ b/src/DataTree.cc
@@ -862,46 +862,6 @@ DataTree::isBinaryOpUsedOnType(SymbolType type, BinaryOpcode opcode) const
   return false;
 }
 
-bool
-DataTree::isTrinaryOpUsed(TrinaryOpcode opcode) const
-{
-  for (const auto &it : trinary_op_node_map)
-    if (get<3>(it.first) == opcode)
-      return true;
-
-  return false;
-}
-
-bool
-DataTree::isExternalFunctionUsed(int symb_id) const
-{
-  for (const auto &it : external_function_node_map)
-    if (it.first.second == symb_id)
-      return true;
-
-  return false;
-}
-
-bool
-DataTree::isFirstDerivExternalFunctionUsed(int symb_id) const
-{
-  for (const auto &it : first_deriv_external_function_node_map)
-    if (get<2>(it.first) == symb_id)
-      return true;
-
-  return false;
-}
-
-bool
-DataTree::isSecondDerivExternalFunctionUsed(int symb_id) const
-{
-  for (const auto &it : second_deriv_external_function_node_map)
-    if (get<3>(it.first) == symb_id)
-      return true;
-
-  return false;
-}
-
 int
 DataTree::minLagForSymbol(int symb_id) const
 {
diff --git a/src/DataTree.hh b/src/DataTree.hh
index 11bd2278..0b6e6b00 100644
--- a/src/DataTree.hh
+++ b/src/DataTree.hh
@@ -275,14 +275,6 @@ public:
   bool isBinaryOpUsed(BinaryOpcode opcode) const;
   //! Checks if a given binary op is used somewhere in the data tree on an endogenous variable
   bool isBinaryOpUsedOnType(SymbolType type, BinaryOpcode opcode) const;
-  //! Checks if a given trinary op is used somewhere in the data tree
-  bool isTrinaryOpUsed(TrinaryOpcode opcode) const;
-  //! Checks if a given external function is used somewhere in the data tree
-  bool isExternalFunctionUsed(int symb_id) const;
-  //! Checks if a given first derivative external function is used somewhere in the data tree
-  bool isFirstDerivExternalFunctionUsed(int symb_id) const;
-  //! Checks if a given second derivative external function is used somewhere in the data tree
-  bool isSecondDerivExternalFunctionUsed(int symb_id) const;
   //! Returns the minimum lag (as a negative number) of the given symbol in the whole data tree (and not only in the equations !!)
   /*! Returns 0 if the symbol is not used */
   int minLagForSymbol(int symb_id) const;
-- 
GitLab