Commit 7bb53824 authored by Sébastien Villemot's avatar Sébastien Villemot

Always use brace-initializer in constructors

The syntax makes clearer the distinction between a function call and an
initialization. Also, it prevents bugs due to implicit type conversions.
parent a4aefb4c
This diff is collapsed.
This diff is collapsed.
...@@ -104,7 +104,7 @@ private: ...@@ -104,7 +104,7 @@ private:
const bool linear_decomposition; const bool linear_decomposition;
public: public:
DetCondForecast(const SymbolList &symbol_list_arg, DetCondForecast(const SymbolList &symbol_list_arg,
const OptionsList &options_list_arg, OptionsList options_list_arg,
const bool linear_decompositiontion_arg); const bool linear_decompositiontion_arg);
//virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings); //virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
virtual void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const; virtual void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const;
...@@ -656,7 +656,7 @@ class IdentificationStatement : public Statement ...@@ -656,7 +656,7 @@ class IdentificationStatement : public Statement
private: private:
OptionsList options_list; OptionsList options_list;
public: public:
explicit IdentificationStatement(const OptionsList &options_list_arg); explicit IdentificationStatement(OptionsList options_list_arg);
void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override; void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
void writeJsonOutput(ostream &output) const override; void writeJsonOutput(ostream &output) const override;
...@@ -820,9 +820,9 @@ private: ...@@ -820,9 +820,9 @@ private:
int getMaxLag() const; int getMaxLag() const;
public: public:
SvarIdentificationStatement(svar_identification_restrictions_t restrictions_arg, SvarIdentificationStatement(svar_identification_restrictions_t restrictions_arg,
const bool &upper_cholesky_present_arg, bool upper_cholesky_present_arg,
const bool &lower_cholesky_present_arg, bool lower_cholesky_present_arg,
const bool &constants_exclusion_present_arg, bool constants_exclusion_present_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override; void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
......
...@@ -53,19 +53,19 @@ SlaveNode::SlaveNode(string computerName_arg, string port_arg, int minCpuNbr_arg ...@@ -53,19 +53,19 @@ SlaveNode::SlaveNode(string computerName_arg, string port_arg, int minCpuNbr_arg
string password_arg, string remoteDrive_arg, string remoteDirectory_arg, string password_arg, string remoteDrive_arg, string remoteDirectory_arg,
string dynarePath_arg, string matlabOctavePath_arg, bool singleCompThread_arg, int numberOfThreadsPerJob_arg, string dynarePath_arg, string matlabOctavePath_arg, bool singleCompThread_arg, int numberOfThreadsPerJob_arg,
string operatingSystem_arg) : string operatingSystem_arg) :
computerName(move(computerName_arg)), computerName{move(computerName_arg)},
port(move(port_arg)), port{move(port_arg)},
minCpuNbr(minCpuNbr_arg), minCpuNbr{minCpuNbr_arg},
maxCpuNbr(maxCpuNbr_arg), maxCpuNbr{maxCpuNbr_arg},
userName(move(userName_arg)), userName{move(userName_arg)},
password(move(password_arg)), password{move(password_arg)},
remoteDrive(move(remoteDrive_arg)), remoteDrive{move(remoteDrive_arg)},
remoteDirectory(move(remoteDirectory_arg)), remoteDirectory{move(remoteDirectory_arg)},
dynarePath(move(dynarePath_arg)), dynarePath{move(dynarePath_arg)},
matlabOctavePath(move(matlabOctavePath_arg)), matlabOctavePath{move(matlabOctavePath_arg)},
singleCompThread(singleCompThread_arg), singleCompThread{singleCompThread_arg},
numberOfThreadsPerJob(numberOfThreadsPerJob_arg), numberOfThreadsPerJob{numberOfThreadsPerJob_arg},
operatingSystem(move(operatingSystem_arg)) operatingSystem{move(operatingSystem_arg)}
{ {
if (computerName.empty()) if (computerName.empty())
{ {
...@@ -82,7 +82,7 @@ SlaveNode::SlaveNode(string computerName_arg, string port_arg, int minCpuNbr_arg ...@@ -82,7 +82,7 @@ SlaveNode::SlaveNode(string computerName_arg, string port_arg, int minCpuNbr_arg
} }
Cluster::Cluster(member_nodes_t member_nodes_arg) : Cluster::Cluster(member_nodes_t member_nodes_arg) :
member_nodes(move(member_nodes_arg)) member_nodes{move(member_nodes_arg)}
{ {
if (member_nodes.empty()) if (member_nodes.empty())
{ {
...@@ -93,8 +93,8 @@ Cluster::Cluster(member_nodes_t member_nodes_arg) : ...@@ -93,8 +93,8 @@ Cluster::Cluster(member_nodes_t member_nodes_arg) :
ConfigFile::ConfigFile(bool parallel_arg, bool parallel_test_arg, ConfigFile::ConfigFile(bool parallel_arg, bool parallel_test_arg,
bool parallel_slave_open_mode_arg, string cluster_name_arg) : bool parallel_slave_open_mode_arg, string cluster_name_arg) :
parallel(parallel_arg), parallel_test(parallel_test_arg), parallel{parallel_arg}, parallel_test{parallel_test_arg},
parallel_slave_open_mode(parallel_slave_open_mode_arg), cluster_name(move(cluster_name_arg)) parallel_slave_open_mode{parallel_slave_open_mode_arg}, cluster_name{move(cluster_name_arg)}
{ {
} }
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
DataTree::DataTree(SymbolTable &symbol_table_arg, DataTree::DataTree(SymbolTable &symbol_table_arg,
NumericalConstants &num_constants_arg, NumericalConstants &num_constants_arg,
ExternalFunctionsTable &external_functions_table_arg) : ExternalFunctionsTable &external_functions_table_arg) :
symbol_table(symbol_table_arg), symbol_table{symbol_table_arg},
num_constants(num_constants_arg), num_constants{num_constants_arg},
external_functions_table(external_functions_table_arg) external_functions_table{external_functions_table_arg}
{ {
Zero = AddNonNegativeConstant("0"); Zero = AddNonNegativeConstant("0");
One = AddNonNegativeConstant("1"); One = AddNonNegativeConstant("1");
......
...@@ -131,7 +131,7 @@ public: ...@@ -131,7 +131,7 @@ public:
{ {
public: public:
string name; string name;
explicit LocalVariableException(string name_arg) : name(move(name_arg)) explicit LocalVariableException(string name_arg) : name{move(name_arg)}
{ {
} }
}; };
...@@ -279,7 +279,7 @@ public: ...@@ -279,7 +279,7 @@ public:
{ {
public: public:
string name; string name;
explicit TrendException(string name_arg) : name(move(name_arg)) explicit TrendException(string name_arg) : name{move(name_arg)}
{ {
} }
}; };
......
...@@ -36,19 +36,9 @@ DynamicModel::DynamicModel(SymbolTable &symbol_table_arg, ...@@ -36,19 +36,9 @@ DynamicModel::DynamicModel(SymbolTable &symbol_table_arg,
ExternalFunctionsTable &external_functions_table_arg, ExternalFunctionsTable &external_functions_table_arg,
TrendComponentModelTable &trend_component_model_table_arg, TrendComponentModelTable &trend_component_model_table_arg,
VarModelTable &var_model_table_arg) : VarModelTable &var_model_table_arg) :
ModelTree(symbol_table_arg, num_constants_arg, external_functions_table_arg), ModelTree{symbol_table_arg, num_constants_arg, external_functions_table_arg},
trend_component_model_table(trend_component_model_table_arg), trend_component_model_table{trend_component_model_table_arg},
var_model_table(var_model_table_arg), var_model_table{var_model_table_arg}
max_lag(0), max_lead(0),
max_endo_lag(0), max_endo_lead(0),
max_exo_lag(0), max_exo_lead(0),
max_exo_det_lag(0), max_exo_det_lead(0),
max_lag_orig(0), max_lead_orig(0),
max_endo_lag_orig(0), max_endo_lead_orig(0),
max_exo_lag_orig(0), max_exo_lead_orig(0),
max_exo_det_lag_orig(0), max_exo_det_lead_orig(0),
dynJacobianColsNbr(0),
global_temporary_terms(true)
{ {
} }
......
...@@ -60,24 +60,24 @@ private: ...@@ -60,24 +60,24 @@ private:
//! Maximum lag and lead over all types of variables (positive values) //! Maximum lag and lead over all types of variables (positive values)
/*! Set by computeDerivIDs() */ /*! Set by computeDerivIDs() */
int max_lag, max_lead; int max_lag{0}, max_lead{0};
//! Maximum lag and lead over endogenous variables (positive values) //! Maximum lag and lead over endogenous variables (positive values)
/*! Set by computeDerivIDs() */ /*! Set by computeDerivIDs() */
int max_endo_lag, max_endo_lead; int max_endo_lag{0}, max_endo_lead{0};
//! Maximum lag and lead over exogenous variables (positive values) //! Maximum lag and lead over exogenous variables (positive values)
/*! Set by computeDerivIDs() */ /*! Set by computeDerivIDs() */
int max_exo_lag, max_exo_lead; int max_exo_lag{0}, max_exo_lead{0};
//! Maximum lag and lead over deterministic exogenous variables (positive values) //! Maximum lag and lead over deterministic exogenous variables (positive values)
/*! Set by computeDerivIDs() */ /*! Set by computeDerivIDs() */
int max_exo_det_lag, max_exo_det_lead; int max_exo_det_lag{0}, max_exo_det_lead{0};
//! Maximum lag and lead over all types of variables (positive values) of original model //! Maximum lag and lead over all types of variables (positive values) of original model
int max_lag_orig, max_lead_orig; int max_lag_orig{0}, max_lead_orig{0};
//! Maximum lag and lead over endogenous variables (positive values) of original model //! Maximum lag and lead over endogenous variables (positive values) of original model
int max_endo_lag_orig, max_endo_lead_orig; int max_endo_lag_orig{0}, max_endo_lead_orig{0};
//! Maximum lag and lead over exogenous variables (positive values) of original model //! Maximum lag and lead over exogenous variables (positive values) of original model
int max_exo_lag_orig, max_exo_lead_orig; int max_exo_lag_orig{0}, max_exo_lead_orig{0};
//! Maximum lag and lead over deterministic exogenous variables (positive values) of original model //! Maximum lag and lead over deterministic exogenous variables (positive values) of original model
int max_exo_det_lag_orig, max_exo_det_lead_orig; int max_exo_det_lag_orig{0}, max_exo_det_lead_orig{0};
//! Cross reference information //! Cross reference information
map<int, ExprNode::EquationInfo> xrefs; map<int, ExprNode::EquationInfo> xrefs;
...@@ -91,7 +91,7 @@ private: ...@@ -91,7 +91,7 @@ private:
//! Number of columns of dynamic jacobian //! Number of columns of dynamic jacobian
/*! Set by computeDerivID()s and computeDynJacobianCols() */ /*! Set by computeDerivID()s and computeDynJacobianCols() */
int dynJacobianColsNbr; int dynJacobianColsNbr{0};
//! Temporary terms for block decomposed models //! Temporary terms for block decomposed models
vector< vector<temporary_terms_t>> v_temporary_terms; vector< vector<temporary_terms_t>> v_temporary_terms;
...@@ -182,7 +182,7 @@ private: ...@@ -182,7 +182,7 @@ private:
private: private:
//! Indicate if the temporary terms are computed for the overall model (true) or not (false). Default value true //! Indicate if the temporary terms are computed for the overall model (true) or not (false). Default value true
bool global_temporary_terms; bool global_temporary_terms{true};
//! Vector describing equations: BlockSimulationType, if BlockSimulationType == EVALUATE_s then a expr_t on the new normalized equation //! Vector describing equations: BlockSimulationType, if BlockSimulationType == EVALUATE_s then a expr_t on the new normalized equation
equation_type_and_normalized_equation_t equation_type_and_normalized_equation; equation_type_and_normalized_equation_t equation_type_and_normalized_equation;
......
...@@ -1037,7 +1037,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2 ...@@ -1037,7 +1037,7 @@ DATE -?[0-9]+([YyAa]|[Mm]([1-9]|1[0-2])|[Qq][1-4]|[Ww]([1-9]{1}|[1-4][0-9]|5[0-2
%% %%
DynareFlex::DynareFlex(istream* in, ostream* out) DynareFlex::DynareFlex(istream* in, ostream* out)
: DynareFlexLexer(in, out) : DynareFlexLexer{in, out}
{ {
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "DataTree.hh" #include "DataTree.hh"
#include "ModFile.hh" #include "ModFile.hh"
ExprNode::ExprNode(DataTree &datatree_arg, int idx_arg) : datatree{datatree_arg}, idx{idx_arg}, preparedForDerivation{false} ExprNode::ExprNode(DataTree &datatree_arg, int idx_arg) : datatree{datatree_arg}, idx{idx_arg}
{ {
} }
...@@ -317,8 +317,8 @@ ExprNode::getEndosAndMaxLags(map<string, int> &model_endos_and_lags) const ...@@ -317,8 +317,8 @@ ExprNode::getEndosAndMaxLags(map<string, int> &model_endos_and_lags) const
} }
NumConstNode::NumConstNode(DataTree &datatree_arg, int idx_arg, int id_arg) : NumConstNode::NumConstNode(DataTree &datatree_arg, int idx_arg, int id_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
id(id_arg) id{id_arg}
{ {
} }
...@@ -712,10 +712,10 @@ NumConstNode::fillErrorCorrectionRow(int eqn, const vector<int> &nontrend_lhs, c ...@@ -712,10 +712,10 @@ NumConstNode::fillErrorCorrectionRow(int eqn, const vector<int> &nontrend_lhs, c
} }
VariableNode::VariableNode(DataTree &datatree_arg, int idx_arg, int symb_id_arg, int lag_arg) : VariableNode::VariableNode(DataTree &datatree_arg, int idx_arg, int symb_id_arg, int lag_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
symb_id(symb_id_arg), symb_id{symb_id_arg},
type(datatree.symbol_table.getType(symb_id_arg)), type{datatree.symbol_table.getType(symb_id_arg)},
lag(lag_arg) lag{lag_arg}
{ {
// It makes sense to allow a lead/lag on parameters: during steady state calibration, endogenous and parameters can be swapped // It makes sense to allow a lead/lag on parameters: during steady state calibration, endogenous and parameters can be swapped
assert(type != SymbolType::externalFunction assert(type != SymbolType::externalFunction
...@@ -2011,14 +2011,14 @@ VariableNode::fillErrorCorrectionRow(int eqn, const vector<int> &nontrend_lhs, c ...@@ -2011,14 +2011,14 @@ VariableNode::fillErrorCorrectionRow(int eqn, const vector<int> &nontrend_lhs, c
} }
UnaryOpNode::UnaryOpNode(DataTree &datatree_arg, int idx_arg, UnaryOpcode op_code_arg, const expr_t arg_arg, int expectation_information_set_arg, int param1_symb_id_arg, int param2_symb_id_arg, string adl_param_name_arg, vector<int> adl_lags_arg) : UnaryOpNode::UnaryOpNode(DataTree &datatree_arg, int idx_arg, UnaryOpcode op_code_arg, const expr_t arg_arg, int expectation_information_set_arg, int param1_symb_id_arg, int param2_symb_id_arg, string adl_param_name_arg, vector<int> adl_lags_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
arg(arg_arg), arg{arg_arg},
expectation_information_set(expectation_information_set_arg), expectation_information_set{expectation_information_set_arg},
param1_symb_id(param1_symb_id_arg), param1_symb_id{param1_symb_id_arg},
param2_symb_id(param2_symb_id_arg), param2_symb_id{param2_symb_id_arg},
op_code(op_code_arg), op_code{op_code_arg},
adl_param_name(move(adl_param_name_arg)), adl_param_name{move(adl_param_name_arg)},
adl_lags(move(adl_lags_arg)) adl_lags{move(adl_lags_arg)}
{ {
} }
...@@ -3762,11 +3762,11 @@ UnaryOpNode::fillErrorCorrectionRow(int eqn, const vector<int> &nontrend_lhs, co ...@@ -3762,11 +3762,11 @@ UnaryOpNode::fillErrorCorrectionRow(int eqn, const vector<int> &nontrend_lhs, co
BinaryOpNode::BinaryOpNode(DataTree &datatree_arg, int idx_arg, const expr_t arg1_arg, BinaryOpNode::BinaryOpNode(DataTree &datatree_arg, int idx_arg, const expr_t arg1_arg,
BinaryOpcode op_code_arg, const expr_t arg2_arg, int powerDerivOrder_arg) : BinaryOpcode op_code_arg, const expr_t arg2_arg, int powerDerivOrder_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
arg1(arg1_arg), arg1{arg1_arg},
arg2(arg2_arg), arg2{arg2_arg},
op_code(op_code_arg), op_code{op_code_arg},
powerDerivOrder(powerDerivOrder_arg) powerDerivOrder{powerDerivOrder_arg}
{ {
assert(powerDerivOrder >= 0); assert(powerDerivOrder >= 0);
} }
...@@ -5864,11 +5864,11 @@ BinaryOpNode::substituteStaticAuxiliaryDefinition() const ...@@ -5864,11 +5864,11 @@ BinaryOpNode::substituteStaticAuxiliaryDefinition() const
TrinaryOpNode::TrinaryOpNode(DataTree &datatree_arg, int idx_arg, const expr_t arg1_arg, TrinaryOpNode::TrinaryOpNode(DataTree &datatree_arg, int idx_arg, const expr_t arg1_arg,
TrinaryOpcode op_code_arg, const expr_t arg2_arg, const expr_t arg3_arg) : TrinaryOpcode op_code_arg, const expr_t arg2_arg, const expr_t arg3_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
arg1(arg1_arg), arg1{arg1_arg},
arg2(arg2_arg), arg2{arg2_arg},
arg3(arg3_arg), arg3{arg3_arg},
op_code(op_code_arg) op_code{op_code_arg}
{ {
} }
...@@ -6804,9 +6804,9 @@ AbstractExternalFunctionNode::AbstractExternalFunctionNode(DataTree &datatree_ar ...@@ -6804,9 +6804,9 @@ AbstractExternalFunctionNode::AbstractExternalFunctionNode(DataTree &datatree_ar
int idx_arg, int idx_arg,
int symb_id_arg, int symb_id_arg,
vector<expr_t> arguments_arg) : vector<expr_t> arguments_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
symb_id(symb_id_arg), symb_id{symb_id_arg},
arguments(move(arguments_arg)) arguments{move(arguments_arg)}
{ {
} }
...@@ -7440,7 +7440,7 @@ ExternalFunctionNode::ExternalFunctionNode(DataTree &datatree_arg, ...@@ -7440,7 +7440,7 @@ ExternalFunctionNode::ExternalFunctionNode(DataTree &datatree_arg,
int idx_arg, int idx_arg,
int symb_id_arg, int symb_id_arg,
const vector<expr_t> &arguments_arg) : const vector<expr_t> &arguments_arg) :
AbstractExternalFunctionNode(datatree_arg, idx_arg, symb_id_arg, arguments_arg) AbstractExternalFunctionNode{datatree_arg, idx_arg, symb_id_arg, arguments_arg}
{ {
} }
...@@ -7770,8 +7770,8 @@ FirstDerivExternalFunctionNode::FirstDerivExternalFunctionNode(DataTree &datatre ...@@ -7770,8 +7770,8 @@ FirstDerivExternalFunctionNode::FirstDerivExternalFunctionNode(DataTree &datatre
int top_level_symb_id_arg, int top_level_symb_id_arg,
const vector<expr_t> &arguments_arg, const vector<expr_t> &arguments_arg,
int inputIndex_arg) : int inputIndex_arg) :
AbstractExternalFunctionNode(datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg), AbstractExternalFunctionNode{datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg},
inputIndex(inputIndex_arg) inputIndex{inputIndex_arg}
{ {
} }
...@@ -8163,9 +8163,9 @@ SecondDerivExternalFunctionNode::SecondDerivExternalFunctionNode(DataTree &datat ...@@ -8163,9 +8163,9 @@ SecondDerivExternalFunctionNode::SecondDerivExternalFunctionNode(DataTree &datat
const vector<expr_t> &arguments_arg, const vector<expr_t> &arguments_arg,
int inputIndex1_arg, int inputIndex1_arg,
int inputIndex2_arg) : int inputIndex2_arg) :
AbstractExternalFunctionNode(datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg), AbstractExternalFunctionNode{datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg},
inputIndex1(inputIndex1_arg), inputIndex1{inputIndex1_arg},
inputIndex2(inputIndex2_arg) inputIndex2{inputIndex2_arg}
{ {
} }
...@@ -8503,7 +8503,7 @@ SecondDerivExternalFunctionNode::sameTefTermPredicate() const ...@@ -8503,7 +8503,7 @@ SecondDerivExternalFunctionNode::sameTefTermPredicate() const
VarExpectationNode::VarExpectationNode(DataTree &datatree_arg, VarExpectationNode::VarExpectationNode(DataTree &datatree_arg,
int idx_arg, int idx_arg,
string model_name_arg) : string model_name_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
model_name{move(model_name_arg)} model_name{move(model_name_arg)}
{ {
} }
...@@ -8969,8 +8969,8 @@ VarExpectationNode::writeJsonOutput(ostream &output, ...@@ -8969,8 +8969,8 @@ VarExpectationNode::writeJsonOutput(ostream &output,
PacExpectationNode::PacExpectationNode(DataTree &datatree_arg, PacExpectationNode::PacExpectationNode(DataTree &datatree_arg,
int idx_arg, int idx_arg,
string model_name_arg) : string model_name_arg) :
ExprNode(datatree_arg, idx_arg), ExprNode{datatree_arg, idx_arg},
model_name(move(model_name_arg)) model_name{move(model_name_arg)}
{ {
} }
......
...@@ -172,7 +172,7 @@ class ExprNode ...@@ -172,7 +172,7 @@ class ExprNode
const int idx; const int idx;
//! Is the data member non_null_derivatives initialized ? //! Is the data member non_null_derivatives initialized ?
bool preparedForDerivation; bool preparedForDerivation{false};
//! Set of derivation IDs with respect to which the derivative is potentially non-null //! Set of derivation IDs with respect to which the derivative is potentially non-null
set<int> non_null_derivatives; set<int> non_null_derivatives;
......
...@@ -37,7 +37,7 @@ public: ...@@ -37,7 +37,7 @@ public:
public: public:
//! Symbol ID //! Symbol ID
int id; int id;
explicit UnknownExternalFunctionSymbolIDException(int id_arg) : id(id_arg) explicit UnknownExternalFunctionSymbolIDException(int id_arg) : id{id_arg}
{ {
} }
}; };
......
...@@ -30,29 +30,27 @@ ...@@ -30,29 +30,27 @@
#include "ComputingTasks.hh" #include "ComputingTasks.hh"
ModFile::ModFile(WarningConsolidation &warnings_arg) ModFile::ModFile(WarningConsolidation &warnings_arg)
: var_model_table(symbol_table), : var_model_table{symbol_table},
trend_component_model_table(symbol_table), trend_component_model_table{symbol_table},
expressions_tree(symbol_table, num_constants, external_functions_table), expressions_tree{symbol_table, num_constants, external_functions_table},
original_model(symbol_table, num_constants, external_functions_table, original_model{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
dynamic_model(symbol_table, num_constants, external_functions_table, dynamic_model{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
trend_dynamic_model(symbol_table, num_constants, external_functions_table, trend_dynamic_model{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
ramsey_FOC_equations_dynamic_model(symbol_table, num_constants, external_functions_table, ramsey_FOC_equations_dynamic_model{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
orig_ramsey_dynamic_model(symbol_table, num_constants, external_functions_table, orig_ramsey_dynamic_model{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
non_linear_equations_dynamic_model(symbol_table, num_constants, external_functions_table, non_linear_equations_dynamic_model{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
epilogue(symbol_table, num_constants, external_functions_table, epilogue{symbol_table, num_constants, external_functions_table,
trend_component_model_table, var_model_table), trend_component_model_table, var_model_table},
static_model(symbol_table, num_constants, external_functions_table), static_model{symbol_table, num_constants, external_functions_table},
steady_state_model(symbol_table, num_constants, external_functions_table, static_model), steady_state_model{symbol_table, num_constants, external_functions_table, static_model},
diff_static_model(symbol_table, num_constants, external_functions_table), diff_static_model{symbol_table, num_constants, external_functions_table},
linear(false), block(false), byte_code(false), use_dll(false), no_static(false), warnings{warnings_arg}
differentiate_forward_vars(false), nonstationary_variables(false),
param_used_with_lead_lag(false), warnings(warnings_arg)
{ {
} }
......
...@@ -79,22 +79,22 @@ public: ...@@ -79,22 +79,22 @@ public:
StaticModel diff_static_model; StaticModel diff_static_model;
//! Option linear //! Option linear
bool linear; bool linear{false};
//! Is the model block decomposed? //! Is the model block decomposed?
bool block; bool block{false};
//! Is the model stored in bytecode format (byte_code=true) or in a M-file (byte_code=false) //! Is the model stored in bytecode format (byte_code=true) or in a M-file (byte_code=false)
bool byte_code; bool byte_code{false};
//! Is the model stored in a MEX file ? (option "use_dll" of "model") //! Is the model stored in a MEX file ? (option "use_dll" of "model")
bool use_dll; bool use_dll{false};
//! Is the static model have to computed (no_static=false) or not (no_static=true). Option of 'model' //! Is the static model have to computed (no_static=false) or not (no_static=true). Option of 'model'
bool no_static; bool no_static{false};
//! Is the 'differentiate_forward_vars' option used? //! Is the 'differentiate_forward_vars' option used?
bool differentiate_forward_vars; bool differentiate_forward_vars{false};
/*! If the 'differentiate_forward_vars' option is used, contains the set of /*! If the 'differentiate_forward_vars' option is used, contains the set of
endogenous with respect to which to do the transformation; endogenous with respect to which to do the transformation;
...@@ -106,14 +106,14 @@ public: ...@@ -106,14 +106,14 @@ public:
bool linear_decomposition{false}; bool linear_decomposition{false};
//! Are nonstationary variables present ? //! Are nonstationary variables present ?
bool nonstationary_variables; bool nonstationary_variables{false};
//! Global evaluation context //! Global evaluation context
/*! Filled using initval blocks and parameters initializations */ /*! Filled using initval blocks and parameters initializations */
eval_context_t global_eval_context; eval_context_t global_eval_context;
//! Parameter used with lead/lag //! Parameter used with lead/lag
bool param_used_with_lead_lag; bool param_used_with_lead_lag{false};
//! Stores the list of extra files to be transefered during a parallel run //! Stores the list of extra files to be transefered during a parallel run
/*! (i.e. option parallel_local_files of model block) */ /*! (i.e. option parallel_local_files of model block) */
......
...@@ -26,8 +26,8 @@ SteadyStateModel::SteadyStateModel(SymbolTable &symbol_table_arg, ...@@ -26,8 +26,8 @@ SteadyStateModel::SteadyStateModel(SymbolTable &symbol_table_arg,
NumericalConstants &num_constants_arg, NumericalConstants &num_constants_arg,
ExternalFunctionsTable &external_functions_table_arg,