Commit 12ca3fe7 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor: removed useless version of DataTree::AddExternalFunction()

parent 4b96b35d
......@@ -469,12 +469,6 @@ DataTree::AddLocalVariable(int symb_id, NodeID value) throw (LocalVariableExcept
local_variables_table[symb_id] = value;
DataTree::AddExternalFunction(const string &function_name, const vector<NodeID> &arguments)
return AddExternalFunction(symbol_table.getID(function_name), arguments);
DataTree::AddExternalFunction(int symb_id, const vector<NodeID> &arguments)
......@@ -191,9 +191,6 @@ public:
//! Adds a model local variable with its value
void AddLocalVariable(int symb_id, NodeID value) throw (LocalVariableException);
//! Adds an external function node
NodeID AddExternalFunction(const string &function_name, const vector<NodeID> &arguments);
//! Adds an external function node
/*! \todo Use a map to share identical nodes */
NodeID AddExternalFunction(int symb_id, const vector<NodeID> &arguments);
//! Adds an external function node for the first derivative of an external function
NodeID AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<NodeID> &arguments, int input_index);
......@@ -3588,7 +3588,7 @@ ExternalFunctionNode::normalizeEquation(int var_endo, vector<pair<int, pair<Node
if (!present)
return (make_pair(0, datatree.AddExternalFunction(datatree.symbol_table.getName(symb_id), V_NodeID)));
return (make_pair(0, datatree.AddExternalFunction(symb_id, V_NodeID)));
return (make_pair(1, (NodeID) NULL));
......@@ -3600,7 +3600,7 @@ ExternalFunctionNode::toStatic(DataTree &static_datatree) const
for (vector<NodeID>::const_iterator it = arguments.begin();
it != arguments.end(); it++)
return static_datatree.AddExternalFunction(datatree.symbol_table.getName(symb_id), static_arguments);
return static_datatree.AddExternalFunction(symb_id, static_arguments);
......@@ -1821,7 +1821,8 @@ ParsingDriver::add_model_var_or_external_function(string *function_name, bool in
//By this point, we're sure that this function exists in the External Functions Table and is not a mod var
nid = data_tree->AddExternalFunction(*function_name,;
int symb_id = mod_file->symbol_table.getID(*function_name);
nid = data_tree->AddExternalFunction(symb_id,;
delete function_name;
return nid;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment