From 6e2024b6edf03bbec9b5e151db7d04b9552ec254 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Tue, 12 Sep 2017 13:29:43 +0200
Subject: [PATCH] preprocessor: remove commented RamseyConstraintsStatement
code
---
ComputingTasks.cc | 57 -----------------------------------------------
ComputingTasks.hh | 1 -
2 files changed, 58 deletions(-)
diff --git a/ComputingTasks.cc b/ComputingTasks.cc
index 7bf65090..3d97098f 100644
--- a/ComputingTasks.cc
+++ b/ComputingTasks.cc
@@ -514,63 +514,6 @@ RamseyConstraintsStatement::writeJsonOutput(ostream &output) const
output << "}";
}
-// Statement *
-// RamseyConstraintsStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
-// {
-// vector<string> errors;
-// SymbolList new_symbol_list, new_options_symbol_list;
-// OptionsList new_options_list = options_list;
-// SymbolTable *new_symbol_table = dynamic_datatree.getSymbolTable();
-// vector<string> symbols = symbol_list.get_symbols();
-
-// for (vector<string>::const_iterator it = symbols.begin(); it != symbols.end(); it++)
-// try
-// {
-// new_symbol_table->getID(*it);
-// new_symbol_list.addSymbol(*it);
-// }
-// catch (SymbolTable::UnknownSymbolIDException &e)
-// {
-// errors.push_back(orig_symbol_table.getName(e.id));
-// }
-// catch (SymbolTable::UnknownSymbolNameException &e)
-// {
-// errors.push_back(e.name);
-// }
-
-// OptionsList::symbol_list_options_t::const_iterator it = options_list.symbol_list_options.find("instruments");
-// if (it != options_list.symbol_list_options.end())
-// {
-// symbols = it->second.get_symbols();
-// for (vector<string>::const_iterator it1 = symbols.begin(); it1 != symbols.end(); it1++)
-// try
-// {
-// new_symbol_table->getID(*it1);
-// new_options_symbol_list.addSymbol(*it1);
-// }
-// catch (SymbolTable::UnknownSymbolIDException &e)
-// {
-// errors.push_back(orig_symbol_table.getName(e.id));
-// }
-// catch (SymbolTable::UnknownSymbolNameException &e)
-// {
-// errors.push_back(e.name);
-// }
-// new_options_list.symbol_list_options["instruments"] = new_options_symbol_list;
-// }
-
-// if (!errors.empty())
-// {
-// cerr << endl
-// << "ERROR: The following vars were used in the ramsey_policy statement(s) but were not declared." << endl
-// << " This likely means that you declared them as varexo and that they're not in the model" << endl;
-// for (vector<string>::const_iterator it = errors.begin(); it != errors.end(); it++)
-// cerr << *it << endl;
-// exit(EXIT_FAILURE);
-// }
-// return new RamseyPolicyStatement(new_symbol_list, options_list);
-// }
-
RamseyPolicyStatement::RamseyPolicyStatement(const SymbolTable &symbol_table_arg,
const vector<string> &ramsey_policy_list_arg,
const OptionsList &options_list_arg) :
diff --git a/ComputingTasks.hh b/ComputingTasks.hh
index 18ec20d1..bd58c215 100644
--- a/ComputingTasks.hh
+++ b/ComputingTasks.hh
@@ -160,7 +160,6 @@ public:
virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const;
virtual void writeJsonOutput(ostream &output) const;
- // virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
};
class RamseyPolicyStatement : public Statement
--
GitLab