diff --git a/preprocessor/DataTree.cc b/preprocessor/DataTree.cc index b45d44794..acbae3488 100644 --- a/preprocessor/DataTree.cc +++ b/preprocessor/DataTree.cc @@ -61,7 +61,6 @@ DataTree::reindex(SymbolTable &orig_symbol_table) first_deriv_external_function_node_map.clear(); second_deriv_external_function_node_map.clear(); - reindexExternalFunctions(orig_symbol_table); reindexLocalVars(orig_symbol_table); } @@ -76,12 +75,6 @@ DataTree::reindexLocalVars(SymbolTable &orig_symbol_table) it->second->cloneDynamicReindex(*this, orig_symbol_table)); } -void -DataTree::reindexExternalFunctions(SymbolTable &orig_symbol_table) -{ - external_functions_table.reindex(symbol_table, orig_symbol_table); -} - expr_t DataTree::AddNonNegativeConstant(const string &value) { diff --git a/preprocessor/DataTree.hh b/preprocessor/DataTree.hh index 9d0f746c1..b7cd2565e 100644 --- a/preprocessor/DataTree.hh +++ b/preprocessor/DataTree.hh @@ -238,8 +238,6 @@ public: void writePowerDerivCHeader(ostream &output) const; //! Write getPowerDeriv void writePowerDeriv(ostream &output, bool use_dll) const; - //! reindex external functions - void reindexExternalFunctions(SymbolTable &orig_symbol_table); void reindex(SymbolTable &orig_symbol_table); void reindexLocalVars(SymbolTable &orig_symbol_table); //! Thrown when trying to access an unknown variable by deriv_id diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index a206a930b..bc9cea5f0 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -316,6 +316,7 @@ ModFile::transformPass(bool nostrict) dynamic_model.reindex(orig_symbol_table); dynamic_model.reindexStaticOnlyEquations(orig_symbol_table); + external_functions_table.reindex(symbol_table, orig_symbol_table); vector orig_statements = statements; statements.clear();