diff --git a/src/CodeInterpreter.hh b/src/CodeInterpreter.hh index ca5cfed6d5a4a4f93602cbd4c7e4edf014cd7c10..dcdc1f084b0ac4d47b8b3ad7ae5d674872d70228 100644 --- a/src/CodeInterpreter.hh +++ b/src/CodeInterpreter.hh @@ -309,7 +309,7 @@ protected: uint8_t op_code; public: inline explicit - TagWithoutArgument(uint8_t op_code_arg) : op_code(op_code_arg) + TagWithoutArgument(uint8_t op_code_arg) : op_code{op_code_arg} { }; inline void @@ -328,11 +328,11 @@ protected: T1 arg1; public: inline explicit - TagWithOneArgument(uint8_t op_code_arg) : op_code(op_code_arg) + TagWithOneArgument(uint8_t op_code_arg) : op_code{op_code_arg} { }; inline - TagWithOneArgument(uint8_t op_code_arg, T1 arg_arg1) : op_code(op_code_arg), arg1(arg_arg1) + TagWithOneArgument(uint8_t op_code_arg, T1 arg_arg1) : op_code{op_code_arg}, arg1{arg_arg1} { }; inline void @@ -352,11 +352,11 @@ protected: T2 arg2; public: inline explicit - TagWithTwoArguments(uint8_t op_code_arg) : op_code(op_code_arg) + TagWithTwoArguments(uint8_t op_code_arg) : op_code{op_code_arg} { }; inline - TagWithTwoArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2) : op_code(op_code_arg), arg1(arg_arg1), arg2(arg_arg2) + TagWithTwoArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2) : op_code{op_code_arg}, arg1{arg_arg1}, arg2{arg_arg2} { }; inline void @@ -377,11 +377,11 @@ protected: T3 arg3; public: inline explicit - TagWithThreeArguments(uint8_t op_code_arg) : op_code(op_code_arg) + TagWithThreeArguments(uint8_t op_code_arg) : op_code{op_code_arg} { }; inline - TagWithThreeArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2, T3 arg_arg3) : op_code(op_code_arg), arg1(arg_arg1), arg2(arg_arg2), arg3(arg_arg3) + TagWithThreeArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2, T3 arg_arg3) : op_code{op_code_arg}, arg1{arg_arg1}, arg2{arg_arg2}, arg3{arg_arg3} { }; inline void @@ -403,11 +403,11 @@ protected: T4 arg4; public: inline explicit - TagWithFourArguments(uint8_t op_code_arg) : op_code(op_code_arg) + TagWithFourArguments(uint8_t op_code_arg) : op_code{op_code_arg} { }; inline - TagWithFourArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2, T3 arg_arg3, T4 arg_arg4) : op_code(op_code_arg), arg1(arg_arg1), arg2(arg_arg2), arg3(move(arg_arg3)), arg4(arg_arg4) + TagWithFourArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2, T3 arg_arg3, T4 arg_arg4) : op_code{op_code_arg}, arg1{arg_arg1}, arg2{arg_arg2}, arg3{move(arg_arg3)}, arg4{arg_arg4} { }; inline void @@ -422,7 +422,7 @@ class FLDZ_ : public TagWithoutArgument { public: inline - FLDZ_() : TagWithoutArgument(FLDZ) + FLDZ_() : TagWithoutArgument{FLDZ} { }; }; @@ -431,7 +431,7 @@ class FEND_ : public TagWithoutArgument { public: inline - FEND_() : TagWithoutArgument(FEND) + FEND_() : TagWithoutArgument{FEND} { }; }; @@ -440,7 +440,7 @@ class FENDBLOCK_ : public TagWithoutArgument { public: inline - FENDBLOCK_() : TagWithoutArgument(FENDBLOCK) + FENDBLOCK_() : TagWithoutArgument{FENDBLOCK} { }; }; @@ -449,7 +449,7 @@ class FENDEQU_ : public TagWithoutArgument { public: inline - FENDEQU_() : TagWithoutArgument(FENDEQU) + FENDEQU_() : TagWithoutArgument{FENDEQU} { }; }; @@ -458,7 +458,7 @@ class FCUML_ : public TagWithoutArgument { public: inline - FCUML_() : TagWithoutArgument(FCUML) + FCUML_() : TagWithoutArgument{FCUML} { }; }; @@ -467,7 +467,7 @@ class FPUSH_ : public TagWithoutArgument { public: inline - FPUSH_() : TagWithoutArgument(FPUSH) + FPUSH_() : TagWithoutArgument{FPUSH} { }; }; @@ -476,7 +476,7 @@ class FPOP_ : public TagWithoutArgument { public: inline - FPOP_() : TagWithoutArgument(FPOP) + FPOP_() : TagWithoutArgument{FPOP} { }; }; @@ -485,11 +485,11 @@ class FDIMT_ : public TagWithOneArgument<unsigned int> { public: inline - FDIMT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMT) + FDIMT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FDIMT} { }; inline explicit - FDIMT_(unsigned int size_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMT, size_arg) + FDIMT_(unsigned int size_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FDIMT, size_arg} { }; inline unsigned int @@ -503,11 +503,11 @@ class FDIMST_ : public TagWithOneArgument<unsigned int> { public: inline - FDIMST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMST) + FDIMST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FDIMST} { }; inline explicit - FDIMST_(const unsigned int size_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMST, size_arg) + FDIMST_(const unsigned int size_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FDIMST, size_arg} { }; inline unsigned int @@ -521,11 +521,11 @@ class FLDC_ : public TagWithOneArgument<double> { public: inline - FLDC_() : TagWithOneArgument<double>::TagWithOneArgument(FLDC) + FLDC_() : TagWithOneArgument<double>::TagWithOneArgument{FLDC} { }; inline explicit - FLDC_(const double value_arg) : TagWithOneArgument<double>::TagWithOneArgument(FLDC, value_arg) + FLDC_(const double value_arg) : TagWithOneArgument<double>::TagWithOneArgument{FLDC, value_arg} { }; inline double @@ -539,11 +539,11 @@ class FLDU_ : public TagWithOneArgument<unsigned int> { public: inline - FLDU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDU) + FLDU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDU} { }; inline explicit - FLDU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDU, pos_arg) + FLDU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDU, pos_arg} { }; inline unsigned int @@ -557,11 +557,11 @@ class FLDSU_ : public TagWithOneArgument<unsigned int> { public: inline - FLDSU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDSU) + FLDSU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDSU} { }; inline explicit - FLDSU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDSU, pos_arg) + FLDSU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDSU, pos_arg} { }; inline unsigned int @@ -575,11 +575,11 @@ class FLDR_ : public TagWithOneArgument<unsigned int> { public: inline - FLDR_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDR) + FLDR_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDR} { }; inline explicit - FLDR_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDR, pos_arg) + FLDR_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDR, pos_arg} { }; inline unsigned int @@ -593,11 +593,11 @@ class FLDT_ : public TagWithOneArgument<unsigned int> { public: inline - FLDT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDT) + FLDT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDT} { }; inline explicit - FLDT_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDT, pos_arg) + FLDT_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDT, pos_arg} { }; inline unsigned int @@ -611,11 +611,11 @@ class FLDST_ : public TagWithOneArgument<unsigned int> { public: inline - FLDST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDST) + FLDST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDST} { }; inline explicit - FLDST_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDST, pos_arg) + FLDST_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDST, pos_arg} { }; inline unsigned int @@ -629,11 +629,11 @@ class FSTPT_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPT) + FSTPT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPT} { }; inline explicit - FSTPT_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPT, pos_arg) + FSTPT_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPT, pos_arg} { }; inline unsigned int @@ -647,11 +647,11 @@ class FSTPST_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPST) + FSTPST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPST} { }; inline explicit - FSTPST_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPST, pos_arg) + FSTPST_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPST, pos_arg} { }; inline unsigned int @@ -665,11 +665,11 @@ class FSTPR_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPR_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPR) + FSTPR_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPR} { }; inline explicit - FSTPR_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPR, pos_arg) + FSTPR_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPR, pos_arg} { }; inline unsigned int @@ -683,11 +683,11 @@ class FSTPU_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPU) + FSTPU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPU} { }; inline explicit - FSTPU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPU, pos_arg) + FSTPU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPU, pos_arg} { }; inline unsigned int @@ -701,11 +701,11 @@ class FSTPSU_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPSU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPSU) + FSTPSU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPSU} { }; inline explicit - FSTPSU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPSU, pos_arg) + FSTPSU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPSU, pos_arg} { }; inline unsigned int @@ -719,11 +719,11 @@ class FSTPG_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPG_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPG, 0) + FSTPG_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPG, 0} { }; inline explicit - FSTPG_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPG, pos_arg) + FSTPG_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPG, pos_arg} { }; inline unsigned int @@ -737,11 +737,11 @@ class FSTPG2_ : public TagWithTwoArguments<unsigned int, unsigned int> { public: inline - FSTPG2_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPG2, 0, 0) + FSTPG2_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments{FSTPG2, 0, 0} { }; inline - FSTPG2_(const unsigned int pos_arg1, const unsigned int pos_arg2) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPG2, pos_arg1, pos_arg2) + FSTPG2_(const unsigned int pos_arg1, const unsigned int pos_arg2) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments{FSTPG2, pos_arg1, pos_arg2} { }; inline unsigned int @@ -760,11 +760,11 @@ class FSTPG3_ : public TagWithFourArguments<unsigned int, unsigned int, int, uns { public: inline - FSTPG3_() : TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>::TagWithFourArguments(FSTPG3, 0, 0, 0, 0) + FSTPG3_() : TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>::TagWithFourArguments{FSTPG3, 0, 0, 0, 0} { }; inline - FSTPG3_(const unsigned int pos_arg1, const unsigned int pos_arg2, const int pos_arg3, const unsigned int pos_arg4) : TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>::TagWithFourArguments(FSTPG3, pos_arg1, pos_arg2, pos_arg3, pos_arg4) + FSTPG3_(const unsigned int pos_arg1, const unsigned int pos_arg2, const int pos_arg3, const unsigned int pos_arg4) : TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>::TagWithFourArguments{FSTPG3, pos_arg1, pos_arg2, pos_arg3, pos_arg4} { }; inline unsigned int @@ -793,11 +793,11 @@ class FUNARY_ : public TagWithOneArgument<uint8_t> { public: inline - FUNARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument(FUNARY) + FUNARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument{FUNARY} { }; inline explicit - FUNARY_(uint8_t op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument(FUNARY, op_type_arg) + FUNARY_(uint8_t op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument{FUNARY, op_type_arg} { }; inline uint8_t @@ -811,11 +811,11 @@ class FBINARY_ : public TagWithOneArgument<uint8_t> { public: inline - FBINARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument(FBINARY) + FBINARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument{FBINARY} { }; inline explicit - FBINARY_(const int op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument(FBINARY, op_type_arg) + FBINARY_(const int op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument{FBINARY, static_cast<uint8_t>(op_type_arg)} { }; inline uint8_t @@ -829,11 +829,11 @@ class FTRINARY_ : public TagWithOneArgument<uint8_t> { public: inline - FTRINARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument(FTRINARY) + FTRINARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument{FTRINARY} { }; inline explicit - FTRINARY_(const int op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument(FTRINARY, op_type_arg) + FTRINARY_(const int op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument{FTRINARY, static_cast<uint8_t>(op_type_arg)} { }; inline uint8_t @@ -847,11 +847,11 @@ class FOK_ : public TagWithOneArgument<int> { public: inline - FOK_() : TagWithOneArgument<int>::TagWithOneArgument(FOK) + FOK_() : TagWithOneArgument<int>::TagWithOneArgument{FOK} { }; inline explicit - FOK_(const int arg_arg) : TagWithOneArgument<int>::TagWithOneArgument(FOK, arg_arg) + FOK_(const int arg_arg) : TagWithOneArgument<int>::TagWithOneArgument{FOK, arg_arg} { }; inline int @@ -865,11 +865,11 @@ class FJMPIFEVAL_ : public TagWithOneArgument<unsigned int> { public: inline - FJMPIFEVAL_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMPIFEVAL) + FJMPIFEVAL_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FJMPIFEVAL} { }; inline explicit - FJMPIFEVAL_(unsigned int arg_pos) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMPIFEVAL, arg_pos) + FJMPIFEVAL_(unsigned int arg_pos) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FJMPIFEVAL, arg_pos} { }; inline unsigned int @@ -883,11 +883,11 @@ class FJMP_ : public TagWithOneArgument<unsigned int> { public: inline - FJMP_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMP) + FJMP_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FJMP} { }; inline explicit - FJMP_(unsigned int arg_pos) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMP, arg_pos) + FJMP_(unsigned int arg_pos) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FJMP, arg_pos} { }; inline unsigned int @@ -901,11 +901,11 @@ class FLDTEF_ : public TagWithOneArgument<unsigned int> { public: inline - FLDTEF_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDTEF) + FLDTEF_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDTEF} { }; inline explicit - FLDTEF_(unsigned int number) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDTEF, number) + FLDTEF_(unsigned int number) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FLDTEF, number} { }; inline unsigned int @@ -919,11 +919,11 @@ class FSTPTEF_ : public TagWithOneArgument<unsigned int> { public: inline - FSTPTEF_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPTEF) + FSTPTEF_() : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPTEF} { }; inline explicit - FSTPTEF_(unsigned int number) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPTEF, number) + FSTPTEF_(unsigned int number) : TagWithOneArgument<unsigned int>::TagWithOneArgument{FSTPTEF, number} { }; inline unsigned int @@ -937,11 +937,11 @@ class FLDTEFD_ : public TagWithTwoArguments<unsigned int, unsigned int> { public: inline - FLDTEFD_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FLDTEFD) + FLDTEFD_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments{FLDTEFD} { }; inline - FLDTEFD_(unsigned int indx, unsigned int row) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FLDTEFD, indx, row) + FLDTEFD_(unsigned int indx, unsigned int row) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments{FLDTEFD, indx, row} { }; inline unsigned int @@ -960,11 +960,11 @@ class FSTPTEFD_ : public TagWithTwoArguments<unsigned int, unsigned int> { public: inline - FSTPTEFD_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPTEFD) + FSTPTEFD_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments{FSTPTEFD} { }; inline - FSTPTEFD_(unsigned int indx, unsigned int row) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPTEFD, indx, row) + FSTPTEFD_(unsigned int indx, unsigned int row) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments{FSTPTEFD, indx, row} { }; inline unsigned int @@ -983,11 +983,11 @@ class FLDTEFDD_ : public TagWithThreeArguments<unsigned int, unsigned int, unsig { public: inline - FLDTEFDD_() : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FLDTEFDD) + FLDTEFDD_() : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments{FLDTEFDD} { }; inline - FLDTEFDD_(unsigned int indx, unsigned int row, unsigned int col) : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FLDTEFDD, indx, row, col) + FLDTEFDD_(unsigned int indx, unsigned int row, unsigned int col) : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments{FLDTEFDD, indx, row, col} { }; inline unsigned int @@ -1011,11 +1011,11 @@ class FSTPTEFDD_ : public TagWithThreeArguments<unsigned int, unsigned int, unsi { public: inline - FSTPTEFDD_() : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FSTPTEFDD) + FSTPTEFDD_() : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments{FSTPTEFDD} { }; inline - FSTPTEFDD_(unsigned int indx, unsigned int row, unsigned int col) : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FSTPTEF, indx, row, col) + FSTPTEFDD_(unsigned int indx, unsigned int row, unsigned int col) : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments{FSTPTEF, indx, row, col} { }; inline unsigned int @@ -1039,11 +1039,11 @@ class FLDVS_ : public TagWithTwoArguments<uint8_t, unsigned int> { public: inline - FLDVS_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FLDVS) + FLDVS_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments{FLDVS} { }; inline - FLDVS_(uint8_t type_arg, const unsigned int pos_arg) : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FLDVS, type_arg, pos_arg) + FLDVS_(uint8_t type_arg, const unsigned int pos_arg) : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments{FLDVS, type_arg, pos_arg} { }; inline uint8_t @@ -1062,12 +1062,12 @@ class FLDSV_ : public TagWithTwoArguments<uint8_t, unsigned int> { public: inline - FLDSV_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FLDSV) + FLDSV_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments{FLDSV} { }; inline FLDSV_(const uint8_t type_arg, const unsigned int pos_arg) : - TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FLDSV, type_arg, pos_arg) + TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments{FLDSV, type_arg, pos_arg} { }; inline uint8_t @@ -1086,12 +1086,12 @@ class FSTPSV_ : public TagWithTwoArguments<uint8_t, unsigned int> { public: inline - FSTPSV_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FSTPSV) + FSTPSV_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments{FSTPSV} { }; inline FSTPSV_(const uint8_t type_arg, const unsigned int pos_arg) : - TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FSTPSV, type_arg, pos_arg) + TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments{FSTPSV, type_arg, pos_arg} { }; inline uint8_t @@ -1110,17 +1110,17 @@ class FLDV_ : public TagWithThreeArguments<uint8_t, unsigned int, int> { public: inline - FLDV_() : TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments(FLDV) + FLDV_() : TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments{FLDV} { }; inline FLDV_(const int type_arg, const unsigned int pos_arg) : - TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments(FLDV, type_arg, pos_arg, 0) + TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments{FLDV, static_cast<uint8_t>(type_arg), pos_arg, 0} { }; inline FLDV_(const int type_arg, const unsigned int pos_arg, const int lead_lag_arg) : - TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments(FLDV, type_arg, pos_arg, lead_lag_arg) + TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments{FLDV, static_cast<uint8_t>(type_arg), pos_arg, lead_lag_arg} { }; inline uint8_t @@ -1144,17 +1144,17 @@ class FSTPV_ : public TagWithThreeArguments<uint8_t, unsigned int, int> { public: inline - FSTPV_() : TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments(FSTPV) + FSTPV_() : TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments{FSTPV} { }; inline FSTPV_(const int type_arg, const unsigned int pos_arg) : - TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments(FSTPV, type_arg, pos_arg, 0) + TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments{FSTPV, static_cast<uint8_t>(type_arg), pos_arg, 0} { }; inline FSTPV_(const int type_arg, const unsigned int pos_arg, const int lead_lag_arg) : - TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments(FSTPV, type_arg, pos_arg, lead_lag_arg) + TagWithThreeArguments<uint8_t, unsigned int, int>::TagWithThreeArguments{FSTPV, static_cast<uint8_t>(type_arg), pos_arg, lead_lag_arg} { }; inline uint8_t @@ -1182,7 +1182,7 @@ class FCALL_ : public TagWithFourArguments<unsigned int, unsigned int, string, u ExternalFunctionType function_type; public: inline - FCALL_() : TagWithFourArguments<unsigned int, unsigned int, string, unsigned int>::TagWithFourArguments(FCALL) + FCALL_() : TagWithFourArguments<unsigned int, unsigned int, string, unsigned int>::TagWithFourArguments{FCALL} { arg_func_name = ""; add_input_arguments = 0; @@ -1192,7 +1192,7 @@ public: }; inline FCALL_(unsigned int nb_output_arguments, unsigned int nb_input_arguments, string f_name, unsigned int indx) : - TagWithFourArguments<unsigned int, unsigned int, string, unsigned int>::TagWithFourArguments(FCALL, nb_output_arguments, nb_input_arguments, f_name, indx) + TagWithFourArguments<unsigned int, unsigned int, string, unsigned int>::TagWithFourArguments{FCALL, nb_output_arguments, nb_input_arguments, f_name, indx} { arg_func_name = ""; add_input_arguments = 0; @@ -1332,67 +1332,76 @@ private: int8_t lag1, lag2, lag3; public: inline - FNUMEXPR_() : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR) + FNUMEXPR_() : TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR} { }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type), - dvariable1(0), dvariable2(0), dvariable3(0), lag1(0), lag2(0), lag3(0) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{0}, dvariable2{0}, dvariable3{0}, + lag1{0}, lag2{0}, lag3{0} { - equation = equation_arg; }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type), - dvariable2(0), dvariable3(0), lag1(0), lag2(0), lag3(0) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{static_cast<uint16_t>(dvariable1_arg)}, dvariable2{0}, dvariable3{0}, + lag1{0}, lag2{0}, lag3{0} { - equation = equation_arg; - dvariable1 = dvariable1_arg; }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, int lag1_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type), - dvariable2(0), dvariable3(0), lag2(0), lag3(0) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, int lag1_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{static_cast<uint16_t>(dvariable1_arg)}, dvariable2{0}, dvariable3{0}, + lag1{static_cast<int8_t>(lag1_arg)}, lag2{0}, lag3{0} { - equation = equation_arg; - dvariable1 = dvariable1_arg; - lag1 = lag1_arg; }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, unsigned int dvariable2_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type), - dvariable3(0), lag1(0), lag2(0), lag3(0) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, unsigned int dvariable2_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{static_cast<uint16_t>(dvariable1_arg)}, + dvariable2{static_cast<uint16_t>(dvariable2_arg)}, + dvariable3{0}, + lag1{0}, lag2{0}, lag3{0} { - equation = equation_arg; - dvariable1 = dvariable1_arg; - dvariable2 = dvariable2_arg; }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, int lag1_arg, unsigned int dvariable2_arg, int lag2_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type), - dvariable3(0), lag3(0) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, int lag1_arg, unsigned int dvariable2_arg, int lag2_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{static_cast<uint16_t>(dvariable1_arg)}, + dvariable2{static_cast<uint16_t>(dvariable2_arg)}, + dvariable3{0}, + lag1{static_cast<int8_t>(lag1_arg)}, + lag2{static_cast<int8_t>(lag2_arg)}, + lag3{0} { - equation = equation_arg; - dvariable1 = dvariable1_arg; - lag1 = lag1_arg; - dvariable2 = dvariable2_arg; - lag2 = lag2_arg; }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, unsigned int dvariable2_arg, unsigned int dvariable3_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type), - lag1(0), lag2(0), lag3(0) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, unsigned int dvariable2_arg, unsigned int dvariable3_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{static_cast<uint16_t>(dvariable1_arg)}, + dvariable2{static_cast<uint16_t>(dvariable2_arg)}, + dvariable3{static_cast<uint16_t>(dvariable3_arg)}, + lag1{0}, lag2{0}, lag3{0} { - equation = equation_arg; - dvariable1 = dvariable1_arg; - dvariable2 = dvariable2_arg; - dvariable3 = dvariable3_arg; }; inline - FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, int lag1_arg, unsigned int dvariable2_arg, int lag2_arg, unsigned int dvariable3_arg, int lag3_arg) : TagWithOneArgument<ExpressionType>::TagWithOneArgument(FNUMEXPR, expression_type) + FNUMEXPR_(const ExpressionType expression_type, unsigned int equation_arg, unsigned int dvariable1_arg, int lag1_arg, unsigned int dvariable2_arg, int lag2_arg, unsigned int dvariable3_arg, int lag3_arg) : + TagWithOneArgument<ExpressionType>::TagWithOneArgument{FNUMEXPR, expression_type}, + equation{equation_arg}, + dvariable1{static_cast<uint16_t>(dvariable1_arg)}, + dvariable2{static_cast<uint16_t>(dvariable2_arg)}, + dvariable3{static_cast<uint16_t>(dvariable3_arg)}, + lag1{static_cast<int8_t>(lag1_arg)}, + lag2{static_cast<int8_t>(lag2_arg)}, + lag3{static_cast<int8_t>(lag3_arg)} { - equation = equation_arg; - dvariable1 = dvariable1_arg; - lag1 = lag1_arg; - dvariable2 = dvariable2_arg; - lag2 = lag2_arg; - dvariable3 = dvariable3_arg; - lag3 = lag3_arg; }; inline ExpressionType get_expression_type() @@ -1445,7 +1454,7 @@ public: class FBEGINBLOCK_ { private: - uint8_t op_code; + uint8_t op_code{FBEGINBLOCK}; int size; uint8_t type; vector<int> variable; @@ -1464,42 +1473,58 @@ private: unsigned int nb_col_det_exo_jacob, nb_col_exo_jacob, nb_col_other_endo_jacob; public: inline - FBEGINBLOCK_() + FBEGINBLOCK_() : size{0}, type{UNKNOWN}, + is_linear{false}, endo_nbr{0}, Max_Lag{0}, Max_Lead{0}, u_count_int{0}, nb_col_jacob{0} { - op_code = FBEGINBLOCK; size = 0; type = UNKNOWN; /*variable = NULL; equation = NULL;*/ - is_linear = false; endo_nbr = 0; Max_Lag = 0; Max_Lead = 0; u_count_int = 0; nb_col_jacob = 0; - }; + } inline FBEGINBLOCK_(unsigned int size_arg, BlockSimulationType type_arg, int unsigned first_element, int unsigned block_size, const vector<int> &variable_arg, const vector<int> &equation_arg, bool is_linear_arg, int endo_nbr_arg, int Max_Lag_arg, int Max_Lead_arg, int &u_count_int_arg, int nb_col_jacob_arg, unsigned int det_exo_size_arg, unsigned int nb_col_det_exo_jacob_arg, unsigned int exo_size_arg, unsigned int nb_col_exo_jacob_arg, unsigned int other_endo_size_arg, unsigned int nb_col_other_endo_jacob_arg, - const vector<unsigned int> &det_exogenous_arg, const vector<unsigned int> &exogenous_arg, const vector<unsigned int> &other_endogenous_arg) + const vector<unsigned int> &det_exogenous_arg, const vector<unsigned int> &exogenous_arg, const vector<unsigned int> &other_endogenous_arg) : + size{static_cast<int>(size_arg)}, + type{type_arg}, + variable{variable_arg.begin()+first_element, variable_arg.begin()+(first_element+block_size)}, + equation{equation_arg.begin()+first_element, equation_arg.begin()+(first_element+block_size)}, + other_endogenous{other_endogenous_arg}, + exogenous{exogenous_arg}, + det_exogenous{det_exogenous_arg}, + is_linear{is_linear_arg}, + endo_nbr{endo_nbr_arg}, + Max_Lag{Max_Lag_arg}, + Max_Lead{Max_Lead_arg}, + u_count_int{u_count_int_arg}, + nb_col_jacob{nb_col_jacob_arg}, + det_exo_size{det_exo_size_arg}, + exo_size{exo_size_arg}, + other_endo_size{other_endo_size_arg}, + nb_col_det_exo_jacob{nb_col_det_exo_jacob_arg}, + nb_col_exo_jacob{nb_col_exo_jacob_arg}, + nb_col_other_endo_jacob{nb_col_other_endo_jacob_arg} { - op_code = FBEGINBLOCK; size = size_arg; type = type_arg; - variable = vector<int>(variable_arg.begin()+first_element, variable_arg.begin()+(first_element+block_size)); - equation = vector<int>(equation_arg.begin()+first_element, equation_arg.begin()+(first_element+block_size)); - det_exogenous = vector<unsigned int>(det_exogenous_arg); - exogenous = vector<unsigned int>(exogenous_arg); - other_endogenous = vector<unsigned int>(other_endogenous_arg); - is_linear = is_linear_arg; endo_nbr = endo_nbr_arg; Max_Lag = Max_Lag_arg; Max_Lead = Max_Lead_arg; u_count_int = u_count_int_arg; - nb_col_jacob = nb_col_jacob_arg; - det_exo_size = det_exo_size_arg; nb_col_det_exo_jacob = nb_col_det_exo_jacob_arg; - exo_size = exo_size_arg; nb_col_exo_jacob = nb_col_exo_jacob_arg; - other_endo_size = other_endo_size_arg; nb_col_other_endo_jacob = nb_col_other_endo_jacob_arg; - }; + } inline FBEGINBLOCK_(unsigned int size_arg, BlockSimulationType type_arg, int unsigned first_element, int unsigned block_size, const vector<int> &variable_arg, const vector<int> &equation_arg, - bool is_linear_arg, int endo_nbr_arg, int Max_Lag_arg, int Max_Lead_arg, int &u_count_int_arg, int nb_col_jacob_arg) - { - op_code = FBEGINBLOCK; size = size_arg; type = type_arg; - variable = vector<int>(variable_arg.begin()+first_element, variable_arg.begin()+(first_element+block_size)); - equation = vector<int>(equation_arg.begin()+first_element, equation_arg.begin()+(first_element+block_size)); - is_linear = is_linear_arg; endo_nbr = endo_nbr_arg; Max_Lag = Max_Lag_arg; Max_Lead = Max_Lead_arg; u_count_int = u_count_int_arg; - nb_col_jacob = nb_col_jacob_arg; - det_exo_size = 0; exo_size = 0; other_endo_size = 0; - nb_col_det_exo_jacob = 0; nb_col_exo_jacob = 0; nb_col_other_endo_jacob = 0; + bool is_linear_arg, int endo_nbr_arg, int Max_Lag_arg, int Max_Lead_arg, int &u_count_int_arg, int nb_col_jacob_arg) : + size{static_cast<int>(size_arg)}, + type{type_arg}, + variable{variable_arg.begin()+first_element, variable_arg.begin()+(first_element+block_size)}, + equation{equation_arg.begin()+first_element, equation_arg.begin()+(first_element+block_size)}, + is_linear{is_linear_arg}, + endo_nbr{endo_nbr_arg}, + Max_Lag{Max_Lag_arg}, + Max_Lead{Max_Lead_arg}, + u_count_int{u_count_int_arg}, + nb_col_jacob{nb_col_jacob_arg}, + det_exo_size{0}, + exo_size{0}, + other_endo_size{0}, + nb_col_det_exo_jacob{0}, + nb_col_exo_jacob{0}, + nb_col_other_endo_jacob{0} + { } inline unsigned int get_size() diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc index 5dc5623f8588c69eab69d0d425319a53a8988ede..f980691bb102ffbd8ea500a93ff9c4a2d281fd2e 100644 --- a/src/ComputingTasks.cc +++ b/src/ComputingTasks.cc @@ -32,7 +32,7 @@ using namespace std; #include <utility> SteadyStatement::SteadyStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -62,7 +62,7 @@ SteadyStatement::writeJsonOutput(ostream &output) const } CheckStatement::CheckStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -92,7 +92,7 @@ CheckStatement::writeJsonOutput(ostream &output) const } ModelInfoStatement::ModelInfoStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -122,7 +122,7 @@ ModelInfoStatement::writeJsonOutput(ostream &output) const } SimulStatement::SimulStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -153,7 +153,7 @@ SimulStatement::writeJsonOutput(ostream &output) const } PerfectForesightSetupStatement::PerfectForesightSetupStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -211,8 +211,8 @@ PerfectForesightSolverStatement::writeJsonOutput(ostream &output) const PriorPosteriorFunctionStatement::PriorPosteriorFunctionStatement(const bool prior_func_arg, OptionsList options_list_arg) : - prior_func(prior_func_arg), - options_list(move(options_list_arg)) + prior_func{prior_func_arg}, + options_list{move(options_list_arg)} { } @@ -381,7 +381,7 @@ PacModelStatement::getPacModelInfoForPacExpectation() const } VarEstimationStatement::VarEstimationStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -413,12 +413,12 @@ VarRestrictionsStatement::VarRestrictionsStatement(string var_model_name_arg, const SymbolTable &symbol_table_arg) : var_model_name{move(var_model_name_arg)}, var_map{move(var_map_arg)}, - exclusion_restrictions(move(exclusion_restrictions_arg)), - equation_restrictions(move(equation_restrictions_arg)), - crossequation_restrictions(move(crossequation_restrictions_arg)), - covariance_number_restriction(move(covariance_number_restriction_arg)), - covariance_pair_restriction(move(covariance_pair_restriction_arg)), - symbol_table(symbol_table_arg) + exclusion_restrictions{move(exclusion_restrictions_arg)}, + equation_restrictions{move(equation_restrictions_arg)}, + crossequation_restrictions{move(crossequation_restrictions_arg)}, + covariance_number_restriction{move(covariance_number_restriction_arg)}, + covariance_pair_restriction{move(covariance_pair_restriction_arg)}, + symbol_table{symbol_table_arg} { } @@ -580,8 +580,8 @@ VarRestrictionsStatement::writeOutput(ostream &output, const string &basename, b StochSimulStatement::StochSimulStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -653,8 +653,8 @@ StochSimulStatement::writeJsonOutput(ostream &output) const ForecastStatement::ForecastStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -684,11 +684,11 @@ ForecastStatement::writeJsonOutput(ostream &output) const } DetCondForecast::DetCondForecast(const SymbolList &symbol_list_arg, - const OptionsList &options_list_arg, + OptionsList options_list_arg, const bool linear_decomposition_arg) : - options_list(options_list_arg), - symbol_list(symbol_list_arg), - linear_decomposition(linear_decomposition_arg) + options_list{move(options_list_arg)}, + symbol_list{symbol_list_arg}, + linear_decomposition{linear_decomposition_arg} { } @@ -736,7 +736,7 @@ DetCondForecast::writeOutput(ostream &output, const string &basename, bool minim } RamseyModelStatement::RamseyModelStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -803,8 +803,8 @@ RamseyModelStatement::writeJsonOutput(ostream &output) const } RamseyConstraintsStatement::RamseyConstraintsStatement(const SymbolTable &symbol_table_arg, constraints_t constraints_arg) : - symbol_table(symbol_table_arg), - constraints(move(constraints_arg)) + symbol_table{symbol_table_arg}, + constraints{move(constraints_arg)} { } @@ -888,9 +888,9 @@ RamseyConstraintsStatement::writeJsonOutput(ostream &output) const RamseyPolicyStatement::RamseyPolicyStatement(const SymbolTable &symbol_table_arg, vector<string> ramsey_policy_list_arg, OptionsList options_list_arg) : - symbol_table(symbol_table_arg), - ramsey_policy_list(move(ramsey_policy_list_arg)), - options_list(move(options_list_arg)) + symbol_table{symbol_table_arg}, + ramsey_policy_list{move(ramsey_policy_list_arg)}, + options_list{move(options_list_arg)} { } @@ -994,8 +994,8 @@ RamseyPolicyStatement::writeJsonOutput(ostream &output) const DiscretionaryPolicyStatement::DiscretionaryPolicyStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -1071,8 +1071,8 @@ DiscretionaryPolicyStatement::writeJsonOutput(ostream &output) const EstimationStatement::EstimationStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -1192,7 +1192,7 @@ EstimationStatement::writeJsonOutput(ostream &output) const } DynareSensitivityStatement::DynareSensitivityStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -1240,7 +1240,7 @@ DynareSensitivityStatement::writeJsonOutput(ostream &output) const } RplotStatement::RplotStatement(SymbolList symbol_list_arg) : - symbol_list(move(symbol_list_arg)) + symbol_list{move(symbol_list_arg)} { } @@ -1281,7 +1281,7 @@ UnitRootVarsStatement::writeJsonOutput(ostream &output) const << "\"steady_state.nocheck\": 1}"; } -PeriodsStatement::PeriodsStatement(int periods_arg) : periods(periods_arg) +PeriodsStatement::PeriodsStatement(int periods_arg) : periods{periods_arg} { } @@ -1298,11 +1298,11 @@ PeriodsStatement::writeJsonOutput(ostream &output) const << "\"periods\": " << periods << "}"; } -DsampleStatement::DsampleStatement(int val1_arg) : val1(val1_arg), val2(-1) +DsampleStatement::DsampleStatement(int val1_arg) : val1{val1_arg}, val2{-1} { } -DsampleStatement::DsampleStatement(int val1_arg, int val2_arg) : val1(val1_arg), val2(val2_arg) +DsampleStatement::DsampleStatement(int val1_arg, int val2_arg) : val1{val1_arg}, val2{val2_arg} { } @@ -1325,8 +1325,8 @@ DsampleStatement::writeJsonOutput(ostream &output) const EstimatedParamsStatement::EstimatedParamsStatement(vector<EstimationParams> estim_params_list_arg, const SymbolTable &symbol_table_arg) : - estim_params_list(move(estim_params_list_arg)), - symbol_table(symbol_table_arg) + estim_params_list{move(estim_params_list_arg)}, + symbol_table{symbol_table_arg} { } @@ -1498,9 +1498,9 @@ EstimatedParamsStatement::writeJsonOutput(ostream &output) const EstimatedParamsInitStatement::EstimatedParamsInitStatement(vector<EstimationParams> estim_params_list_arg, const SymbolTable &symbol_table_arg, const bool use_calibration_arg) : - estim_params_list(move(estim_params_list_arg)), - symbol_table(symbol_table_arg), - use_calibration(use_calibration_arg) + estim_params_list{move(estim_params_list_arg)}, + symbol_table{symbol_table_arg}, + use_calibration{use_calibration_arg} { } @@ -1605,8 +1605,8 @@ EstimatedParamsInitStatement::writeJsonOutput(ostream &output) const EstimatedParamsBoundsStatement::EstimatedParamsBoundsStatement(vector<EstimationParams> estim_params_list_arg, const SymbolTable &symbol_table_arg) : - estim_params_list(move(estim_params_list_arg)), - symbol_table(symbol_table_arg) + estim_params_list{move(estim_params_list_arg)}, + symbol_table{symbol_table_arg} { } @@ -1724,8 +1724,8 @@ EstimatedParamsBoundsStatement::writeJsonOutput(ostream &output) const ObservationTrendsStatement::ObservationTrendsStatement(trend_elements_t trend_elements_arg, const SymbolTable &symbol_table_arg) : - trend_elements(move(trend_elements_arg)), - symbol_table(symbol_table_arg) + trend_elements{move(trend_elements_arg)}, + symbol_table{symbol_table_arg} { } @@ -1773,8 +1773,8 @@ ObservationTrendsStatement::writeJsonOutput(ostream &output) const } OsrParamsStatement::OsrParamsStatement(SymbolList symbol_list_arg, const SymbolTable &symbol_table_arg) : - symbol_list(move(symbol_list_arg)), - symbol_table(symbol_table_arg) + symbol_list{move(symbol_list_arg)}, + symbol_table{symbol_table_arg} { } @@ -1812,13 +1812,13 @@ OsrParamsStatement::writeJsonOutput(ostream &output) const OsrStatement::OsrStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } OsrParamsBoundsStatement::OsrParamsBoundsStatement(vector<OsrParams> osr_params_list_arg) : - osr_params_list(move(osr_params_list_arg)) + osr_params_list{move(osr_params_list_arg)} { } @@ -1927,9 +1927,9 @@ OsrStatement::writeJsonOutput(ostream &output) const OptimWeightsStatement::OptimWeightsStatement(var_weights_t var_weights_arg, covar_weights_t covar_weights_arg, const SymbolTable &symbol_table_arg) : - var_weights(move(var_weights_arg)), - covar_weights(move(covar_weights_arg)), - symbol_table(symbol_table_arg) + var_weights{move(var_weights_arg)}, + covar_weights{move(covar_weights_arg)}, + symbol_table{symbol_table_arg} { } @@ -2006,8 +2006,8 @@ OptimWeightsStatement::writeJsonOutput(ostream &output) const DynaSaveStatement::DynaSaveStatement(SymbolList symbol_list_arg, string filename_arg) : - symbol_list(move(symbol_list_arg)), - filename(move(filename_arg)) + symbol_list{move(symbol_list_arg)}, + filename{move(filename_arg)} { } @@ -2062,8 +2062,8 @@ DynaTypeStatement::writeJsonOutput(ostream &output) const ModelComparisonStatement::ModelComparisonStatement(filename_list_t filename_list_arg, OptionsList options_list_arg) : - filename_list(move(filename_list_arg)), - options_list(move(options_list_arg)) + filename_list{move(filename_list_arg)}, + options_list{move(options_list_arg)} { } @@ -2165,8 +2165,8 @@ PlannerObjectiveStatement::writeJsonOutput(ostream &output) const } BVARDensityStatement::BVARDensityStatement(int maxnlags_arg, OptionsList options_list_arg) : - maxnlags(maxnlags_arg), - options_list(move(options_list_arg)) + maxnlags{maxnlags_arg}, + options_list{move(options_list_arg)} { } @@ -2196,8 +2196,8 @@ BVARDensityStatement::writeJsonOutput(ostream &output) const } BVARForecastStatement::BVARForecastStatement(int nlags_arg, OptionsList options_list_arg) : - nlags(nlags_arg), - options_list(move(options_list_arg)) + nlags{nlags_arg}, + options_list{move(options_list_arg)} { } @@ -2227,7 +2227,7 @@ BVARForecastStatement::writeJsonOutput(ostream &output) const } SBVARStatement::SBVARStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2257,7 +2257,7 @@ SBVARStatement::writeJsonOutput(ostream &output) const } MSSBVAREstimationStatement::MSSBVAREstimationStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2338,7 +2338,7 @@ MSSBVARSimulationStatement::writeJsonOutput(ostream &output) const } MSSBVARComputeMDDStatement::MSSBVARComputeMDDStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2369,7 +2369,7 @@ MSSBVARComputeMDDStatement::writeJsonOutput(ostream &output) const } MSSBVARComputeProbabilitiesStatement::MSSBVARComputeProbabilitiesStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2409,8 +2409,8 @@ MSSBVARComputeProbabilitiesStatement::writeJsonOutput(ostream &output) const MSSBVARIrfStatement::MSSBVARIrfStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -2472,7 +2472,7 @@ MSSBVARIrfStatement::writeJsonOutput(ostream &output) const } MSSBVARForecastStatement::MSSBVARForecastStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2510,7 +2510,7 @@ MSSBVARForecastStatement::writeJsonOutput(ostream &output) const } MSSBVARVarianceDecompositionStatement::MSSBVARVarianceDecompositionStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2565,9 +2565,9 @@ MSSBVARVarianceDecompositionStatement::writeJsonOutput(ostream &output) const output << "}"; } -IdentificationStatement::IdentificationStatement(const OptionsList &options_list_arg) +IdentificationStatement::IdentificationStatement(OptionsList options_list_arg) + : options_list{move(options_list_arg)} { - options_list = options_list_arg; if (options_list.num_options.find("max_dim_cova_group") != options_list.num_options.end()) if (stoi(options_list.num_options["max_dim_cova_group"]) == 0) { @@ -2617,8 +2617,8 @@ IdentificationStatement::writeJsonOutput(ostream &output) const } WriteLatexDynamicModelStatement::WriteLatexDynamicModelStatement(const DynamicModel &dynamic_model_arg, bool write_equation_tags_arg) : - dynamic_model(dynamic_model_arg), - write_equation_tags(write_equation_tags_arg) + dynamic_model{dynamic_model_arg}, + write_equation_tags{write_equation_tags_arg} { } @@ -2653,8 +2653,8 @@ WriteLatexStaticModelStatement::writeJsonOutput(ostream &output) const } WriteLatexOriginalModelStatement::WriteLatexOriginalModelStatement(const DynamicModel &original_model_arg, bool write_equation_tags_arg) : - original_model(original_model_arg), - write_equation_tags(write_equation_tags_arg) + original_model{original_model_arg}, + write_equation_tags{write_equation_tags_arg} { } @@ -2671,7 +2671,7 @@ WriteLatexOriginalModelStatement::writeJsonOutput(ostream &output) const } WriteLatexSteadyStateModelStatement::WriteLatexSteadyStateModelStatement(const SteadyStateModel &steady_state_model_arg) : - steady_state_model(steady_state_model_arg) + steady_state_model{steady_state_model_arg} { } @@ -2695,8 +2695,8 @@ WriteLatexSteadyStateModelStatement::writeJsonOutput(ostream &output) const ShockDecompositionStatement::ShockDecompositionStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -2727,8 +2727,8 @@ ShockDecompositionStatement::writeJsonOutput(ostream &output) const RealtimeShockDecompositionStatement::RealtimeShockDecompositionStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -2742,8 +2742,8 @@ RealtimeShockDecompositionStatement::writeOutput(ostream &output, const string & PlotShockDecompositionStatement::PlotShockDecompositionStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -2758,8 +2758,8 @@ PlotShockDecompositionStatement::writeOutput(ostream &output, const string &base InitialConditionDecompositionStatement::InitialConditionDecompositionStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -2773,7 +2773,7 @@ InitialConditionDecompositionStatement::writeOutput(ostream &output, const strin } ConditionalForecastStatement::ConditionalForecastStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -2797,8 +2797,8 @@ ConditionalForecastStatement::writeJsonOutput(ostream &output) const } PlotConditionalForecastStatement::PlotConditionalForecastStatement(int periods_arg, SymbolList symbol_list_arg) : - periods(periods_arg), - symbol_list(move(symbol_list_arg)) + periods{periods_arg}, + symbol_list{move(symbol_list_arg)} { } @@ -2826,15 +2826,15 @@ PlotConditionalForecastStatement::writeJsonOutput(ostream &output) const } SvarIdentificationStatement::SvarIdentificationStatement(svar_identification_restrictions_t restrictions_arg, - const bool &upper_cholesky_present_arg, - const bool &lower_cholesky_present_arg, - const bool &constants_exclusion_present_arg, + bool upper_cholesky_present_arg, + bool lower_cholesky_present_arg, + bool constants_exclusion_present_arg, const SymbolTable &symbol_table_arg) : - restrictions(move(restrictions_arg)), - upper_cholesky_present(upper_cholesky_present_arg), - lower_cholesky_present(lower_cholesky_present_arg), - constants_exclusion_present(constants_exclusion_present_arg), - symbol_table(symbol_table_arg) + restrictions{move(restrictions_arg)}, + upper_cholesky_present{upper_cholesky_present_arg}, + lower_cholesky_present{lower_cholesky_present_arg}, + constants_exclusion_present{constants_exclusion_present_arg}, + symbol_table{symbol_table_arg} { } @@ -2972,7 +2972,7 @@ SvarIdentificationStatement::writeJsonOutput(ostream &output) const } MarkovSwitchingStatement::MarkovSwitchingStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { auto it_num = options_list.num_options.find("ms.restrictions"); if (it_num != options_list.num_options.end()) @@ -3234,7 +3234,7 @@ MarkovSwitchingStatement::writeJsonOutput(ostream &output) const } SvarStatement::SvarStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -3324,7 +3324,7 @@ SvarGlobalIdentificationCheckStatement::writeJsonOutput(ostream &output) const } SetTimeStatement::SetTimeStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -3347,7 +3347,7 @@ SetTimeStatement::writeJsonOutput(ostream &output) const } EstimationDataStatement::EstimationDataStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -3401,9 +3401,9 @@ SubsamplesStatement::SubsamplesStatement(string name1_arg, string name2_arg, subsample_declaration_map_t subsample_declaration_map_arg, const SymbolTable &symbol_table_arg) : - name1(move(name1_arg)), - name2(move(name2_arg)), - subsample_declaration_map(subsample_declaration_map_arg), + name1{move(name1_arg)}, + name2{move(name2_arg)}, + subsample_declaration_map{subsample_declaration_map_arg}, symbol_table{symbol_table_arg} { } @@ -3499,10 +3499,10 @@ SubsamplesEqualStatement::SubsamplesEqualStatement(string to_name1_arg, string from_name1_arg, string from_name2_arg, const SymbolTable &symbol_table_arg) : - to_name1(move(to_name1_arg)), - to_name2(move(to_name2_arg)), - from_name1(move(from_name1_arg)), - from_name2(move(from_name2_arg)), + to_name1{move(to_name1_arg)}, + to_name2{move(to_name2_arg)}, + from_name1{move(from_name1_arg)}, + from_name2{move(from_name2_arg)}, symbol_table{symbol_table_arg} { } @@ -3573,8 +3573,8 @@ JointPriorStatement::JointPriorStatement(vector<string> joint_parameters_arg, PriorDistributions prior_shape_arg, OptionsList options_list_arg) : joint_parameters{move(joint_parameters_arg)}, - prior_shape(prior_shape_arg), - options_list(move(options_list_arg)) + prior_shape{prior_shape_arg}, + options_list{move(options_list_arg)} { } @@ -3736,11 +3736,11 @@ BasicPriorStatement::BasicPriorStatement(string name_arg, PriorDistributions prior_shape_arg, expr_t variance_arg, OptionsList options_list_arg) : - name(move(name_arg)), - subsample_name(move(subsample_name_arg)), - prior_shape(prior_shape_arg), - variance(variance_arg), - options_list(move(options_list_arg)) + name{move(name_arg)}, + subsample_name{move(subsample_name_arg)}, + prior_shape{prior_shape_arg}, + variance{variance_arg}, + options_list{move(options_list_arg)} { } @@ -4081,7 +4081,7 @@ CorrPriorStatement::CorrPriorStatement(string name_arg1, string name_arg2, OptionsList options_list_arg, const SymbolTable &symbol_table_arg) : BasicPriorStatement{move(name_arg1), move(subsample_name_arg), prior_shape_arg, variance_arg, move(options_list_arg)}, - name1(move(name_arg2)), + name1{move(name_arg2)}, symbol_table{symbol_table_arg} { } @@ -4164,14 +4164,14 @@ PriorEqualStatement::PriorEqualStatement(string to_declaration_type_arg, string from_name2_arg, string from_subsample_name_arg, const SymbolTable &symbol_table_arg) : - to_declaration_type(move(to_declaration_type_arg)), - to_name1(move(to_name1_arg)), - to_name2(move(to_name2_arg)), - to_subsample_name(move(to_subsample_name_arg)), - from_declaration_type(move(from_declaration_type_arg)), - from_name1(move(from_name1_arg)), - from_name2(move(from_name2_arg)), - from_subsample_name(move(from_subsample_name_arg)), + to_declaration_type{move(to_declaration_type_arg)}, + to_name1{move(to_name1_arg)}, + to_name2{move(to_name2_arg)}, + to_subsample_name{move(to_subsample_name_arg)}, + from_declaration_type{move(from_declaration_type_arg)}, + from_name1{move(from_name1_arg)}, + from_name2{move(from_name2_arg)}, + from_subsample_name{move(from_subsample_name_arg)}, symbol_table{symbol_table_arg} { } @@ -4278,9 +4278,9 @@ BasicOptionsStatement::~BasicOptionsStatement() BasicOptionsStatement::BasicOptionsStatement(string name_arg, string subsample_name_arg, OptionsList options_list_arg) : - name(move(name_arg)), - subsample_name(move(subsample_name_arg)), - options_list(move(options_list_arg)) + name{move(name_arg)}, + subsample_name{move(subsample_name_arg)}, + options_list{move(options_list_arg)} { } @@ -4527,14 +4527,14 @@ OptionsEqualStatement::OptionsEqualStatement(string to_declaration_type_arg, string from_name2_arg, string from_subsample_name_arg, const SymbolTable &symbol_table_arg) : - to_declaration_type(move(to_declaration_type_arg)), - to_name1(move(to_name1_arg)), - to_name2(move(to_name2_arg)), - to_subsample_name(move(to_subsample_name_arg)), - from_declaration_type(move(from_declaration_type_arg)), - from_name1(move(from_name1_arg)), - from_name2(move(from_name2_arg)), - from_subsample_name(move(from_subsample_name_arg)), + to_declaration_type{move(to_declaration_type_arg)}, + to_name1{move(to_name1_arg)}, + to_name2{move(to_name2_arg)}, + to_subsample_name{move(to_subsample_name_arg)}, + from_declaration_type{move(from_declaration_type_arg)}, + from_name1{move(from_name1_arg)}, + from_name2{move(from_name2_arg)}, + from_subsample_name{move(from_subsample_name_arg)}, symbol_table{symbol_table_arg} { } @@ -4637,7 +4637,7 @@ OptionsEqualStatement::writeOutput(ostream &output, const string &basename, bool CalibSmootherStatement::CalibSmootherStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) - : symbol_list(move(symbol_list_arg)), options_list(move(options_list_arg)) + : symbol_list{move(symbol_list_arg)}, options_list{move(options_list_arg)} { } @@ -4678,7 +4678,7 @@ CalibSmootherStatement::writeJsonOutput(ostream &output) const } ExtendedPathStatement::ExtendedPathStatement(OptionsList options_list_arg) - : options_list(move(options_list_arg)) + : options_list{move(options_list_arg)} { } @@ -4740,7 +4740,7 @@ ModelDiagnosticsStatement::writeJsonOutput(ostream &output) const } Smoother2histvalStatement::Smoother2histvalStatement(OptionsList options_list_arg) : - options_list(move(options_list_arg)) + options_list{move(options_list_arg)} { } @@ -4765,8 +4765,8 @@ Smoother2histvalStatement::writeJsonOutput(ostream &output) const GMMEstimationStatement::GMMEstimationStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -4798,8 +4798,8 @@ GMMEstimationStatement::writeJsonOutput(ostream &output) const SMMEstimationStatement::SMMEstimationStatement(SymbolList symbol_list_arg, OptionsList options_list_arg) : - symbol_list(move(symbol_list_arg)), - options_list(move(options_list_arg)) + symbol_list{move(symbol_list_arg)}, + options_list{move(options_list_arg)} { } @@ -4832,9 +4832,9 @@ SMMEstimationStatement::writeJsonOutput(ostream &output) const GenerateIRFsStatement::GenerateIRFsStatement(OptionsList options_list_arg, vector<string> generate_irf_names_arg, vector<map<string, double>> generate_irf_elements_arg) : - options_list(move(options_list_arg)), - generate_irf_names(move(generate_irf_names_arg)), - generate_irf_elements(move(generate_irf_elements_arg)) + options_list{move(options_list_arg)}, + generate_irf_names{move(generate_irf_names_arg)}, + generate_irf_elements{move(generate_irf_elements_arg)} { } diff --git a/src/ComputingTasks.hh b/src/ComputingTasks.hh index 24830b6d0020930fcac3409d7b741e0c05935ee5..595cd9817ba3475b07313180f66ac8a1d4e7be0d 100644 --- a/src/ComputingTasks.hh +++ b/src/ComputingTasks.hh @@ -104,7 +104,7 @@ private: const bool linear_decomposition; public: DetCondForecast(const SymbolList &symbol_list_arg, - const OptionsList &options_list_arg, + OptionsList options_list_arg, const bool linear_decompositiontion_arg); //virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings); virtual void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const; @@ -656,7 +656,7 @@ class IdentificationStatement : public Statement private: OptionsList options_list; public: - explicit IdentificationStatement(const OptionsList &options_list_arg); + explicit IdentificationStatement(OptionsList options_list_arg); void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override; void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; void writeJsonOutput(ostream &output) const override; @@ -820,9 +820,9 @@ private: int getMaxLag() const; public: SvarIdentificationStatement(svar_identification_restrictions_t restrictions_arg, - const bool &upper_cholesky_present_arg, - const bool &lower_cholesky_present_arg, - const bool &constants_exclusion_present_arg, + bool upper_cholesky_present_arg, + bool lower_cholesky_present_arg, + bool constants_exclusion_present_arg, const SymbolTable &symbol_table_arg); void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override; void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; diff --git a/src/ConfigFile.cc b/src/ConfigFile.cc index 118643a471317189f8f064a05f0b2781af664823..82e9af335c7b697e8a9387f662839c8464006b9a 100644 --- a/src/ConfigFile.cc +++ b/src/ConfigFile.cc @@ -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 dynarePath_arg, string matlabOctavePath_arg, bool singleCompThread_arg, int numberOfThreadsPerJob_arg, string operatingSystem_arg) : - computerName(move(computerName_arg)), - port(move(port_arg)), - minCpuNbr(minCpuNbr_arg), - maxCpuNbr(maxCpuNbr_arg), - userName(move(userName_arg)), - password(move(password_arg)), - remoteDrive(move(remoteDrive_arg)), - remoteDirectory(move(remoteDirectory_arg)), - dynarePath(move(dynarePath_arg)), - matlabOctavePath(move(matlabOctavePath_arg)), - singleCompThread(singleCompThread_arg), - numberOfThreadsPerJob(numberOfThreadsPerJob_arg), - operatingSystem(move(operatingSystem_arg)) + computerName{move(computerName_arg)}, + port{move(port_arg)}, + minCpuNbr{minCpuNbr_arg}, + maxCpuNbr{maxCpuNbr_arg}, + userName{move(userName_arg)}, + password{move(password_arg)}, + remoteDrive{move(remoteDrive_arg)}, + remoteDirectory{move(remoteDirectory_arg)}, + dynarePath{move(dynarePath_arg)}, + matlabOctavePath{move(matlabOctavePath_arg)}, + singleCompThread{singleCompThread_arg}, + numberOfThreadsPerJob{numberOfThreadsPerJob_arg}, + operatingSystem{move(operatingSystem_arg)} { if (computerName.empty()) { @@ -82,7 +82,7 @@ SlaveNode::SlaveNode(string computerName_arg, string port_arg, int minCpuNbr_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()) { @@ -93,8 +93,8 @@ Cluster::Cluster(member_nodes_t member_nodes_arg) : ConfigFile::ConfigFile(bool parallel_arg, bool parallel_test_arg, bool parallel_slave_open_mode_arg, string cluster_name_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{parallel_arg}, parallel_test{parallel_test_arg}, + parallel_slave_open_mode{parallel_slave_open_mode_arg}, cluster_name{move(cluster_name_arg)} { } diff --git a/src/DataTree.cc b/src/DataTree.cc index f12a2ad19c9cfffa8eae0d0e7005679ae0ce94b4..3cf538456712cd08b143f90b31e1db1c4a85b74c 100644 --- a/src/DataTree.cc +++ b/src/DataTree.cc @@ -29,9 +29,9 @@ DataTree::DataTree(SymbolTable &symbol_table_arg, NumericalConstants &num_constants_arg, ExternalFunctionsTable &external_functions_table_arg) : - symbol_table(symbol_table_arg), - num_constants(num_constants_arg), - external_functions_table(external_functions_table_arg) + symbol_table{symbol_table_arg}, + num_constants{num_constants_arg}, + external_functions_table{external_functions_table_arg} { Zero = AddNonNegativeConstant("0"); One = AddNonNegativeConstant("1"); diff --git a/src/DataTree.hh b/src/DataTree.hh index c1a64898154149d3d74c75bd9eec7bfe0ecbe504..fffb57fcc587edf0a8744e7fd266066573716d55 100644 --- a/src/DataTree.hh +++ b/src/DataTree.hh @@ -131,7 +131,7 @@ public: { public: 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: { public: string name; - explicit TrendException(string name_arg) : name(move(name_arg)) + explicit TrendException(string name_arg) : name{move(name_arg)} { } }; diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc index ed8a61e0fcbc8db05053f54e0e1f30c9798e2c3c..10b99eec3dde50592fd50d55cf721d45a44b84d4 100644 --- a/src/DynamicModel.cc +++ b/src/DynamicModel.cc @@ -36,19 +36,9 @@ DynamicModel::DynamicModel(SymbolTable &symbol_table_arg, ExternalFunctionsTable &external_functions_table_arg, TrendComponentModelTable &trend_component_model_table_arg, VarModelTable &var_model_table_arg) : - ModelTree(symbol_table_arg, num_constants_arg, external_functions_table_arg), - trend_component_model_table(trend_component_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) + ModelTree{symbol_table_arg, num_constants_arg, external_functions_table_arg}, + trend_component_model_table{trend_component_model_table_arg}, + var_model_table{var_model_table_arg} { } diff --git a/src/DynamicModel.hh b/src/DynamicModel.hh index b021b9694abcd9daee658e9d84dd11dee1995692..1b5fc23ef3c565bd1f4b0d1b6a561b9e76b95195 100644 --- a/src/DynamicModel.hh +++ b/src/DynamicModel.hh @@ -60,24 +60,24 @@ private: //! Maximum lag and lead over all types of variables (positive values) /*! Set by computeDerivIDs() */ - int max_lag, max_lead; + int max_lag{0}, max_lead{0}; //! Maximum lag and lead over endogenous variables (positive values) /*! 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) /*! 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) /*! 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 - 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 - 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 - 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 - 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 map<int, ExprNode::EquationInfo> xrefs; @@ -91,7 +91,7 @@ private: //! Number of columns of dynamic jacobian /*! Set by computeDerivID()s and computeDynJacobianCols() */ - int dynJacobianColsNbr; + int dynJacobianColsNbr{0}; //! Temporary terms for block decomposed models vector< vector<temporary_terms_t>> v_temporary_terms; @@ -182,7 +182,7 @@ private: private: //! 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 equation_type_and_normalized_equation_t equation_type_and_normalized_equation; diff --git a/src/DynareFlex.ll b/src/DynareFlex.ll index 2f3be1e022e6c7fe9377c218debbe78e95b79fcf..c0a10f37df1f8a1338c2ba288eaa51337b8268bd 100644 --- a/src/DynareFlex.ll +++ b/src/DynareFlex.ll @@ -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) - : DynareFlexLexer(in, out) + : DynareFlexLexer{in, out} { } diff --git a/src/ExprNode.cc b/src/ExprNode.cc index a76772c293168f6e1d6fd773b4be40bd0e7b6600..2dcd9635969be106a35cd7af73d21a2931725eee 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -30,7 +30,7 @@ #include "DataTree.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 } NumConstNode::NumConstNode(DataTree &datatree_arg, int idx_arg, int id_arg) : - ExprNode(datatree_arg, idx_arg), - id(id_arg) + ExprNode{datatree_arg, idx_arg}, + id{id_arg} { } @@ -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) : - ExprNode(datatree_arg, idx_arg), - symb_id(symb_id_arg), - type(datatree.symbol_table.getType(symb_id_arg)), - lag(lag_arg) + ExprNode{datatree_arg, idx_arg}, + symb_id{symb_id_arg}, + type{datatree.symbol_table.getType(symb_id_arg)}, + lag{lag_arg} { // It makes sense to allow a lead/lag on parameters: during steady state calibration, endogenous and parameters can be swapped assert(type != SymbolType::externalFunction @@ -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) : - ExprNode(datatree_arg, idx_arg), - arg(arg_arg), - expectation_information_set(expectation_information_set_arg), - param1_symb_id(param1_symb_id_arg), - param2_symb_id(param2_symb_id_arg), - op_code(op_code_arg), - adl_param_name(move(adl_param_name_arg)), - adl_lags(move(adl_lags_arg)) + ExprNode{datatree_arg, idx_arg}, + arg{arg_arg}, + expectation_information_set{expectation_information_set_arg}, + param1_symb_id{param1_symb_id_arg}, + param2_symb_id{param2_symb_id_arg}, + op_code{op_code_arg}, + adl_param_name{move(adl_param_name_arg)}, + adl_lags{move(adl_lags_arg)} { } @@ -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, BinaryOpcode op_code_arg, const expr_t arg2_arg, int powerDerivOrder_arg) : - ExprNode(datatree_arg, idx_arg), - arg1(arg1_arg), - arg2(arg2_arg), - op_code(op_code_arg), - powerDerivOrder(powerDerivOrder_arg) + ExprNode{datatree_arg, idx_arg}, + arg1{arg1_arg}, + arg2{arg2_arg}, + op_code{op_code_arg}, + powerDerivOrder{powerDerivOrder_arg} { assert(powerDerivOrder >= 0); } @@ -5864,11 +5864,11 @@ BinaryOpNode::substituteStaticAuxiliaryDefinition() const 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) : - ExprNode(datatree_arg, idx_arg), - arg1(arg1_arg), - arg2(arg2_arg), - arg3(arg3_arg), - op_code(op_code_arg) + ExprNode{datatree_arg, idx_arg}, + arg1{arg1_arg}, + arg2{arg2_arg}, + arg3{arg3_arg}, + op_code{op_code_arg} { } @@ -6804,9 +6804,9 @@ AbstractExternalFunctionNode::AbstractExternalFunctionNode(DataTree &datatree_ar int idx_arg, int symb_id_arg, vector<expr_t> arguments_arg) : - ExprNode(datatree_arg, idx_arg), - symb_id(symb_id_arg), - arguments(move(arguments_arg)) + ExprNode{datatree_arg, idx_arg}, + symb_id{symb_id_arg}, + arguments{move(arguments_arg)} { } @@ -7440,7 +7440,7 @@ ExternalFunctionNode::ExternalFunctionNode(DataTree &datatree_arg, int idx_arg, int symb_id_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 int top_level_symb_id_arg, const vector<expr_t> &arguments_arg, int inputIndex_arg) : - AbstractExternalFunctionNode(datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg), - inputIndex(inputIndex_arg) + AbstractExternalFunctionNode{datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg}, + inputIndex{inputIndex_arg} { } @@ -8163,9 +8163,9 @@ SecondDerivExternalFunctionNode::SecondDerivExternalFunctionNode(DataTree &datat const vector<expr_t> &arguments_arg, int inputIndex1_arg, int inputIndex2_arg) : - AbstractExternalFunctionNode(datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg), - inputIndex1(inputIndex1_arg), - inputIndex2(inputIndex2_arg) + AbstractExternalFunctionNode{datatree_arg, idx_arg, top_level_symb_id_arg, arguments_arg}, + inputIndex1{inputIndex1_arg}, + inputIndex2{inputIndex2_arg} { } @@ -8503,7 +8503,7 @@ SecondDerivExternalFunctionNode::sameTefTermPredicate() const VarExpectationNode::VarExpectationNode(DataTree &datatree_arg, int idx_arg, string model_name_arg) : - ExprNode(datatree_arg, idx_arg), + ExprNode{datatree_arg, idx_arg}, model_name{move(model_name_arg)} { } @@ -8969,8 +8969,8 @@ VarExpectationNode::writeJsonOutput(ostream &output, PacExpectationNode::PacExpectationNode(DataTree &datatree_arg, int idx_arg, string model_name_arg) : - ExprNode(datatree_arg, idx_arg), - model_name(move(model_name_arg)) + ExprNode{datatree_arg, idx_arg}, + model_name{move(model_name_arg)} { } diff --git a/src/ExprNode.hh b/src/ExprNode.hh index 1bd85c8173ed4fd2120de958e4a222e360440dee..207bb1a9471015e50d0a389f822e5e24fb4bb053 100644 --- a/src/ExprNode.hh +++ b/src/ExprNode.hh @@ -172,7 +172,7 @@ class ExprNode const int idx; //! 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<int> non_null_derivatives; diff --git a/src/ExternalFunctionsTable.hh b/src/ExternalFunctionsTable.hh index ee534ccc3f299493a5fe3e8b6f09ab2802be3f92..34719703f138653fdb0ef8fb07e08c01ba71de9d 100644 --- a/src/ExternalFunctionsTable.hh +++ b/src/ExternalFunctionsTable.hh @@ -37,7 +37,7 @@ public: public: //! Symbol ID int id; - explicit UnknownExternalFunctionSymbolIDException(int id_arg) : id(id_arg) + explicit UnknownExternalFunctionSymbolIDException(int id_arg) : id{id_arg} { } }; diff --git a/src/ModFile.cc b/src/ModFile.cc index 6fd3d547a7861b865c4dae09ee43f48bcda8958b..03f99f0763c2ef261b96f1f52b186c7bfeaa93fa 100644 --- a/src/ModFile.cc +++ b/src/ModFile.cc @@ -30,29 +30,27 @@ #include "ComputingTasks.hh" ModFile::ModFile(WarningConsolidation &warnings_arg) - : var_model_table(symbol_table), - trend_component_model_table(symbol_table), - expressions_tree(symbol_table, num_constants, external_functions_table), - original_model(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - dynamic_model(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - trend_dynamic_model(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - ramsey_FOC_equations_dynamic_model(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - orig_ramsey_dynamic_model(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - non_linear_equations_dynamic_model(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - epilogue(symbol_table, num_constants, external_functions_table, - trend_component_model_table, var_model_table), - static_model(symbol_table, num_constants, external_functions_table), - steady_state_model(symbol_table, num_constants, external_functions_table, static_model), - diff_static_model(symbol_table, num_constants, external_functions_table), - linear(false), block(false), byte_code(false), use_dll(false), no_static(false), - differentiate_forward_vars(false), nonstationary_variables(false), - param_used_with_lead_lag(false), warnings(warnings_arg) + : var_model_table{symbol_table}, + trend_component_model_table{symbol_table}, + expressions_tree{symbol_table, num_constants, external_functions_table}, + original_model{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + dynamic_model{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + trend_dynamic_model{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + ramsey_FOC_equations_dynamic_model{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + orig_ramsey_dynamic_model{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + non_linear_equations_dynamic_model{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + epilogue{symbol_table, num_constants, external_functions_table, + trend_component_model_table, var_model_table}, + static_model{symbol_table, num_constants, external_functions_table}, + steady_state_model{symbol_table, num_constants, external_functions_table, static_model}, + diff_static_model{symbol_table, num_constants, external_functions_table}, + warnings{warnings_arg} { } diff --git a/src/ModFile.hh b/src/ModFile.hh index 1592d229afe2ed5ca76f6ea1452c57044521b5dc..04e8cdbe59a787696c2ea26cf131ae47d2260d77 100644 --- a/src/ModFile.hh +++ b/src/ModFile.hh @@ -79,22 +79,22 @@ public: StaticModel diff_static_model; //! Option linear - bool linear; + bool linear{false}; //! 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) - bool byte_code; + bool byte_code{false}; //! 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' - bool no_static; + bool no_static{false}; //! 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 endogenous with respect to which to do the transformation; @@ -106,14 +106,14 @@ public: bool linear_decomposition{false}; //! Are nonstationary variables present ? - bool nonstationary_variables; + bool nonstationary_variables{false}; //! Global evaluation context /*! Filled using initval blocks and parameters initializations */ eval_context_t global_eval_context; //! 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 /*! (i.e. option parallel_local_files of model block) */ diff --git a/src/ModelEquationBlock.cc b/src/ModelEquationBlock.cc index 34ea65fbeaaf90bf55c5fd5ecd525abf7552fa11..2f0b859c938d6883a8da04c4c8b0cc2294db4750 100644 --- a/src/ModelEquationBlock.cc +++ b/src/ModelEquationBlock.cc @@ -26,8 +26,8 @@ SteadyStateModel::SteadyStateModel(SymbolTable &symbol_table_arg, NumericalConstants &num_constants_arg, ExternalFunctionsTable &external_functions_table_arg, const StaticModel &static_model_arg) : - DataTree(symbol_table_arg, num_constants_arg, external_functions_table_arg), - static_model(static_model_arg) + DataTree{symbol_table_arg, num_constants_arg, external_functions_table_arg}, + static_model{static_model_arg} { } @@ -272,8 +272,8 @@ Epilogue::Epilogue(SymbolTable &symbol_table_arg, ExternalFunctionsTable &external_functions_table_arg, TrendComponentModelTable &trend_component_model_table_arg, VarModelTable &var_model_table_arg) : - DynamicModel(symbol_table_arg, num_constants_arg, external_functions_table_arg, - trend_component_model_table_arg, var_model_table_arg) + DynamicModel{symbol_table_arg, num_constants_arg, external_functions_table_arg, + trend_component_model_table_arg, var_model_table_arg} { } diff --git a/src/ModelTree.cc b/src/ModelTree.cc index a5a67e3c34e13bf0ec42f24b71018f3c7a842824..72745c88f93716e1290dfb9cf764629f07ba13d1 100644 --- a/src/ModelTree.cc +++ b/src/ModelTree.cc @@ -1134,10 +1134,7 @@ ModelTree::BlockLinear(const blocks_derivatives_t &blocks_derivatives, const vec ModelTree::ModelTree(SymbolTable &symbol_table_arg, NumericalConstants &num_constants_arg, ExternalFunctionsTable &external_functions_table_arg) : - DataTree(symbol_table_arg, num_constants_arg, external_functions_table_arg), - cutoff(1e-15), - mfs(0) - + DataTree{symbol_table_arg, num_constants_arg, external_functions_table_arg} { for (int & NNZDerivative : NNZDerivatives) NNZDerivative = 0; diff --git a/src/ModelTree.hh b/src/ModelTree.hh index 44ea97904612af28d28863be806c576b1382f393..bdbe1cc461970f7e48abed6bd3a12678a04df137 100644 --- a/src/ModelTree.hh +++ b/src/ModelTree.hh @@ -336,14 +336,14 @@ public: NumericalConstants &num_constants_arg, ExternalFunctionsTable &external_functions_table_arg); //! Absolute value under which a number is considered to be zero - double cutoff; + double cutoff{1e-15}; //! Compute the minimum feedback set /*! 0 : all endogenous variables are considered as feedback variables 1 : the variables belonging to non normalized equation are considered as feedback variables 2 : the variables belonging to a non linear equation are considered as feedback variables 3 : the variables belonging to a non normalizable non linear equation are considered as feedback variables default value = 0 */ - int mfs; + int mfs{0}; //! Declare a node as an equation of the model; also give its line number void addEquation(expr_t eq, int lineno); //! Declare a node as an equation of the model, also giving its tags diff --git a/src/NumericalInitialization.cc b/src/NumericalInitialization.cc index 28aa2799dc26037df498d6299a574a232b71f5e3..8034bd4ae13de288a818732f7c59f7ec54cb120d 100644 --- a/src/NumericalInitialization.cc +++ b/src/NumericalInitialization.cc @@ -28,9 +28,9 @@ InitParamStatement::InitParamStatement(int symb_id_arg, const expr_t param_value_arg, const SymbolTable &symbol_table_arg) : - symb_id(symb_id_arg), - param_value(param_value_arg), - symbol_table(symbol_table_arg) + symb_id{symb_id_arg}, + param_value{param_value_arg}, + symbol_table{symbol_table_arg} { } @@ -98,9 +98,9 @@ InitParamStatement::fillEvalContext(eval_context_t &eval_context) const InitOrEndValStatement::InitOrEndValStatement(init_values_t init_values_arg, const SymbolTable &symbol_table_arg, const bool &all_values_required_arg) : - init_values(move(init_values_arg)), - symbol_table(symbol_table_arg), - all_values_required(all_values_required_arg) + init_values{move(init_values_arg)}, + symbol_table{symbol_table_arg}, + all_values_required{all_values_required_arg} { } @@ -188,7 +188,7 @@ InitOrEndValStatement::writeJsonInitValues(ostream &output) const InitValStatement::InitValStatement(const init_values_t &init_values_arg, const SymbolTable &symbol_table_arg, const bool &all_values_required_arg) : - InitOrEndValStatement(init_values_arg, symbol_table_arg, all_values_required_arg) + InitOrEndValStatement{init_values_arg, symbol_table_arg, all_values_required_arg} { } @@ -252,7 +252,7 @@ InitValStatement::writeOutputPostInit(ostream &output) const EndValStatement::EndValStatement(const init_values_t &init_values_arg, const SymbolTable &symbol_table_arg, const bool &all_values_required_arg) : - InitOrEndValStatement(init_values_arg, symbol_table_arg, all_values_required_arg) + InitOrEndValStatement{init_values_arg, symbol_table_arg, all_values_required_arg} { } @@ -307,10 +307,10 @@ HistValStatement::HistValStatement(hist_values_t hist_values_arg, const hist_vals_wrong_lag_t hist_vals_wrong_lag_arg, const SymbolTable &symbol_table_arg, const bool &all_values_required_arg) : - hist_values(move(hist_values_arg)), - hist_vals_wrong_lag(hist_vals_wrong_lag_arg), - symbol_table(symbol_table_arg), - all_values_required(all_values_required_arg) + hist_values{move(hist_values_arg)}, + hist_vals_wrong_lag{hist_vals_wrong_lag_arg}, + symbol_table{symbol_table_arg}, + all_values_required{all_values_required_arg} { } @@ -429,7 +429,7 @@ HistValStatement::writeJsonOutput(ostream &output) const } InitvalFileStatement::InitvalFileStatement(string filename_arg) : - filename(move(filename_arg)) + filename{move(filename_arg)} { } @@ -452,7 +452,7 @@ InitvalFileStatement::writeJsonOutput(ostream &output) const } HistvalFileStatement::HistvalFileStatement(string filename_arg) : - filename(move(filename_arg)) + filename{move(filename_arg)} { } @@ -472,8 +472,8 @@ HistvalFileStatement::writeJsonOutput(ostream &output) const HomotopyStatement::HomotopyStatement(homotopy_values_t homotopy_values_arg, const SymbolTable &symbol_table_arg) : - homotopy_values(move(homotopy_values_arg)), - symbol_table(symbol_table_arg) + homotopy_values{move(homotopy_values_arg)}, + symbol_table{symbol_table_arg} { } @@ -530,7 +530,7 @@ HomotopyStatement::writeJsonOutput(ostream &output) const } SaveParamsAndSteadyStateStatement::SaveParamsAndSteadyStateStatement(string filename_arg) : - filename(move(filename_arg)) + filename{move(filename_arg)} { } @@ -551,7 +551,7 @@ SaveParamsAndSteadyStateStatement::writeJsonOutput(ostream &output) const LoadParamsAndSteadyStateStatement::LoadParamsAndSteadyStateStatement(const string &filename, const SymbolTable &symbol_table_arg, WarningConsolidation &warnings) : - symbol_table(symbol_table_arg) + symbol_table{symbol_table_arg} { cout << "Reading " << filename << "." << endl; diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index c94ed1c9e4389bc6661149f2e31ae4836b94f50e..985c3e8d17b038aee767d8b2bada4dc2f7e2ffaf 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -260,11 +260,11 @@ private: void clear_VAR_storage(); //! True when parsing the epilogue block - bool parsing_epilogue; + bool parsing_epilogue{false}; public: ParsingDriver(WarningConsolidation &warnings_arg, bool nostrict_arg) : - warnings(warnings_arg), nostrict(nostrict_arg), parsing_epilogue(false) { }; + warnings{warnings_arg}, nostrict{nostrict_arg} { }; //! Starts parsing, and constructs the MOD file representation unique_ptr<ModFile> parse(istream &in, bool debug); diff --git a/src/Shocks.cc b/src/Shocks.cc index a9f92fc4db689dd6f7b0bf7e4857e0bd9f3c585d..a1f618f28a490ef91ececff44a578ee8c58183fc 100644 --- a/src/Shocks.cc +++ b/src/Shocks.cc @@ -28,10 +28,10 @@ AbstractShocksStatement::AbstractShocksStatement(bool mshocks_arg, bool overwrite_arg, det_shocks_t det_shocks_arg, const SymbolTable &symbol_table_arg) : - mshocks(mshocks_arg), - overwrite(overwrite_arg), - det_shocks(move(det_shocks_arg)), - symbol_table(symbol_table_arg) + mshocks{mshocks_arg}, + overwrite{overwrite_arg}, + det_shocks{move(det_shocks_arg)}, + symbol_table{symbol_table_arg} { } @@ -101,11 +101,11 @@ ShocksStatement::ShocksStatement(bool overwrite_arg, covar_and_corr_shocks_t covar_shocks_arg, covar_and_corr_shocks_t corr_shocks_arg, const SymbolTable &symbol_table_arg) : - AbstractShocksStatement(false, overwrite_arg, det_shocks_arg, symbol_table_arg), - var_shocks(move(var_shocks_arg)), - std_shocks(move(std_shocks_arg)), - covar_shocks(move(covar_shocks_arg)), - corr_shocks(move(corr_shocks_arg)) + AbstractShocksStatement{false, overwrite_arg, det_shocks_arg, symbol_table_arg}, + var_shocks{move(var_shocks_arg)}, + std_shocks{move(std_shocks_arg)}, + covar_shocks{move(covar_shocks_arg)}, + corr_shocks{move(corr_shocks_arg)} { } @@ -415,7 +415,7 @@ ShocksStatement::has_calibrated_measurement_errors() const MShocksStatement::MShocksStatement(bool overwrite_arg, const det_shocks_t &det_shocks_arg, const SymbolTable &symbol_table_arg) : - AbstractShocksStatement(true, overwrite_arg, det_shocks_arg, symbol_table_arg) + AbstractShocksStatement{true, overwrite_arg, det_shocks_arg, symbol_table_arg} { } @@ -434,9 +434,8 @@ MShocksStatement::writeOutput(ostream &output, const string &basename, bool mini ConditionalForecastPathsStatement::ConditionalForecastPathsStatement(AbstractShocksStatement::det_shocks_t paths_arg, const SymbolTable &symbol_table_arg) : - paths(move(paths_arg)), - symbol_table(symbol_table_arg), - path_length(-1) + paths{move(paths_arg)}, + symbol_table{symbol_table_arg} { } @@ -487,7 +486,7 @@ ConditionalForecastPathsStatement::writeOutput(ostream &output, const string &ba MomentCalibration::MomentCalibration(constraints_t constraints_arg, const SymbolTable &symbol_table_arg) - : constraints(move(constraints_arg)), symbol_table(symbol_table_arg) + : constraints{move(constraints_arg)}, symbol_table{symbol_table_arg} { } @@ -529,7 +528,7 @@ MomentCalibration::writeJsonOutput(ostream &output) const IrfCalibration::IrfCalibration(constraints_t constraints_arg, const SymbolTable &symbol_table_arg, OptionsList options_list_arg) - : constraints(move(constraints_arg)), symbol_table(symbol_table_arg), options_list(move(options_list_arg)) + : constraints{move(constraints_arg)}, symbol_table{symbol_table_arg}, options_list{move(options_list_arg)} { } @@ -577,7 +576,7 @@ IrfCalibration::writeJsonOutput(ostream &output) const } ShockGroupsStatement::ShockGroupsStatement(group_t shock_groups_arg, string name_arg) - : shock_groups(move(shock_groups_arg)), name(move(name_arg)) + : shock_groups{move(shock_groups_arg)}, name{move(name_arg)} { } diff --git a/src/Shocks.hh b/src/Shocks.hh index f9fdb76735c76c1c4888d5ecf798b05ec5ecad72..0b15062ebf77f39bafb2345e9543f0794675d809 100644 --- a/src/Shocks.hh +++ b/src/Shocks.hh @@ -97,7 +97,7 @@ class ConditionalForecastPathsStatement : public Statement private: const AbstractShocksStatement::det_shocks_t paths; const SymbolTable &symbol_table; - int path_length; + int path_length{-1}; public: ConditionalForecastPathsStatement(AbstractShocksStatement::det_shocks_t paths_arg, const SymbolTable &symbol_table_arg); diff --git a/src/SigmaeInitialization.cc b/src/SigmaeInitialization.cc index 18acd1e99cd7a0b78f1be22205268cfd39f8a3f3..82e0cfff5542eeff1defd43df40b80a177d71826 100644 --- a/src/SigmaeInitialization.cc +++ b/src/SigmaeInitialization.cc @@ -22,8 +22,8 @@ #include "SigmaeInitialization.hh" SigmaeStatement::SigmaeStatement(matrix_t matrix_arg) noexcept(false) : - matrix(move(matrix_arg)), - matrix_form(determineMatrixForm(matrix)) + matrix{move(matrix_arg)}, + matrix_form{determineMatrixForm(matrix)} { } diff --git a/src/Statement.cc b/src/Statement.cc index af34fe98827a3dfc0f4f77cd976de1743cb408ea..ffcc00b47d37a2f66f13f0a6100b15e6ae5ae6f4 100644 --- a/src/Statement.cc +++ b/src/Statement.cc @@ -21,8 +21,7 @@ #include <boost/xpressive/xpressive.hpp> #include <utility> -ModFileStructure::ModFileStructure() : - dsge_var_calibrated("") +ModFileStructure::ModFileStructure() { } @@ -55,7 +54,7 @@ Statement::computingPass() } NativeStatement::NativeStatement(string native_statement_arg) : - native_statement(move(native_statement_arg)) + native_statement{move(native_statement_arg)} { } @@ -81,7 +80,7 @@ NativeStatement::writeJsonOutput(ostream &output) const } VerbatimStatement::VerbatimStatement(string verbatim_statement_arg) : - verbatim_statement(move(verbatim_statement_arg)) + verbatim_statement{move(verbatim_statement_arg)} { } diff --git a/src/StaticModel.cc b/src/StaticModel.cc index fc4bbd4202ed1669054ae9e0e88e03487867bd36..b164dc144ea4fa56cbf7aea5fc7b6221284b12f2 100644 --- a/src/StaticModel.cc +++ b/src/StaticModel.cc @@ -32,8 +32,7 @@ StaticModel::StaticModel(SymbolTable &symbol_table_arg, NumericalConstants &num_constants_arg, ExternalFunctionsTable &external_functions_table_arg) : - ModelTree(symbol_table_arg, num_constants_arg, external_functions_table_arg), - global_temporary_terms(true) + ModelTree{symbol_table_arg, num_constants_arg, external_functions_table_arg} { } diff --git a/src/StaticModel.hh b/src/StaticModel.hh index e29d4b0373993526629349d07019ab18755b6a62..ca6b0f634360bfca0bdd079baa77c42ea0bfc794 100644 --- a/src/StaticModel.hh +++ b/src/StaticModel.hh @@ -106,7 +106,7 @@ private: protected: //! 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 equation_type_and_normalized_equation_t equation_type_and_normalized_equation; diff --git a/src/SubModel.cc b/src/SubModel.cc index f4f89d2a4bdce8bc6144f392a62eff4a42d2fde2..4811af06dfce47ead05b37094d6a0091734da865 100644 --- a/src/SubModel.cc +++ b/src/SubModel.cc @@ -22,7 +22,7 @@ #include "SubModel.hh" TrendComponentModelTable::TrendComponentModelTable(SymbolTable &symbol_table_arg) : - symbol_table(symbol_table_arg) + symbol_table{symbol_table_arg} { } @@ -401,7 +401,7 @@ TrendComponentModelTable::writeJsonOutput(ostream &output) const } VarModelTable::VarModelTable(SymbolTable &symbol_table_arg) : - symbol_table(symbol_table_arg) + symbol_table{symbol_table_arg} { } diff --git a/src/SymbolTable.cc b/src/SymbolTable.cc index 78198671c8490deddefe4878f26e125c0b609588..46d7ef6396f354b676778cd58ed27948db98ecc4 100644 --- a/src/SymbolTable.cc +++ b/src/SymbolTable.cc @@ -28,13 +28,13 @@ AuxVarInfo::AuxVarInfo(int symb_id_arg, AuxVarType type_arg, int orig_symb_id_arg, int orig_lead_lag_arg, int equation_number_for_multiplier_arg, int information_set_arg, expr_t expr_node_arg) : - symb_id(symb_id_arg), - type(type_arg), - orig_symb_id(orig_symb_id_arg), - orig_lead_lag(orig_lead_lag_arg), - equation_number_for_multiplier(equation_number_for_multiplier_arg), - information_set(information_set_arg), - expr_node(expr_node_arg) + symb_id{symb_id_arg}, + type{type_arg}, + orig_symb_id{orig_symb_id_arg}, + orig_lead_lag{orig_lead_lag_arg}, + equation_number_for_multiplier{equation_number_for_multiplier_arg}, + information_set{information_set_arg}, + expr_node{expr_node_arg} { } diff --git a/src/SymbolTable.hh b/src/SymbolTable.hh index cbd1bd41674daa9878926a132e00746470921d73..19488e68453e221bb106a37e2c5e37b20257be37 100644 --- a/src/SymbolTable.hh +++ b/src/SymbolTable.hh @@ -167,7 +167,7 @@ public: public: //! Symbol name string name; - explicit UnknownSymbolNameException(string name_arg) : name(move(name_arg)) + explicit UnknownSymbolNameException(string name_arg) : name{move(name_arg)} { } }; @@ -177,7 +177,7 @@ public: public: //! Symbol ID int id; - explicit UnknownSymbolIDException(int id_arg) : id(id_arg) + explicit UnknownSymbolIDException(int id_arg) : id{id_arg} { } }; @@ -187,7 +187,7 @@ public: public: int tsid; SymbolType type; - UnknownTypeSpecificIDException(int tsid_arg, SymbolType type_arg) : tsid(tsid_arg), type(type_arg) + UnknownTypeSpecificIDException(int tsid_arg, SymbolType type_arg) : tsid{tsid_arg}, type{type_arg} { } }; @@ -199,7 +199,7 @@ public: string name; //! Was the previous declaration done with the same symbol type ? bool same_type; - AlreadyDeclaredException(string name_arg, bool same_type_arg) : name(move(name_arg)), same_type(same_type_arg) + AlreadyDeclaredException(string name_arg, bool same_type_arg) : name{move(name_arg)}, same_type{same_type_arg} { } }; @@ -216,11 +216,11 @@ public: { public: int orig_symb_id, orig_lead_lag, symb_id; - SearchFailedException(int orig_symb_id_arg, int orig_lead_lag_arg) : orig_symb_id(orig_symb_id_arg), - orig_lead_lag(orig_lead_lag_arg) + SearchFailedException(int orig_symb_id_arg, int orig_lead_lag_arg) : orig_symb_id{orig_symb_id_arg}, + orig_lead_lag{orig_lead_lag_arg} { } - explicit SearchFailedException(int symb_id_arg) : symb_id(symb_id_arg) + explicit SearchFailedException(int symb_id_arg) : symb_id{symb_id_arg} { } }; diff --git a/src/WarningConsolidation.hh b/src/WarningConsolidation.hh index 67bb5304801dc4aa48bb6ca8b8e730214f58eb98..ed52a4fae3a2a9d1f86bfc73b765c393093ebbca 100644 --- a/src/WarningConsolidation.hh +++ b/src/WarningConsolidation.hh @@ -34,7 +34,7 @@ private: bool no_warn; public: - explicit WarningConsolidation(bool no_warn_arg) : no_warn(no_warn_arg) + explicit WarningConsolidation(bool no_warn_arg) : no_warn{no_warn_arg} { }; ~WarningConsolidation() diff --git a/src/macro/MacroDriver.hh b/src/macro/MacroDriver.hh index 992cceef970459ef51397fc6175d5a2c616a83ca..097fad31daeb888027b7a94254362aefbc0cb1b1 100644 --- a/src/macro/MacroDriver.hh +++ b/src/macro/MacroDriver.hh @@ -97,7 +97,7 @@ private: //! The paths to search when looking for .mod files vector<string> path; //! True iff current context is the body of a loop - bool is_for_context; + bool is_for_context{false}; //! If current context is the body of a loop, contains the string of the loop body string for_body; //! If current context is the body of a loop, contains the location of the beginning of the body @@ -112,7 +112,7 @@ private: //! Temporary variable used in FOR_BODY mode. Keeps track of number of nested @#for/@#endfor int nested_for_nb; //! Set to true while parsing a FOR statement (only the statement, not the loop body) - bool reading_for_statement; + bool reading_for_statement{false}; //! Temporary variable used in THEN_BODY and ELSE_BODY modes. Keeps track of number of nested @#if int nested_if_nb; @@ -127,7 +127,7 @@ private: //! Temporary variable used in ELSE_BODY mode Macro::parser::location_type else_body_loc_tmp; //! Set to true while parsing an IF statement (only the statement, not the body) - bool reading_if_statement; + bool reading_if_statement{false}; //! Set to true while parsing the comprehension in a new buffer bool is_comprehension_context{false}; @@ -208,7 +208,7 @@ public: { public: const string name; - explicit UnknownVariable(string name_arg) : name(move(name_arg)) + explicit UnknownVariable(string name_arg) : name{move(name_arg)} { } }; diff --git a/src/macro/MacroFlex.ll b/src/macro/MacroFlex.ll index 0de931cd8b0cffb362f232e5af50aacbdeff2a55..6521807527ba95940c20b68f272eae84c692ca2a 100644 --- a/src/macro/MacroFlex.ll +++ b/src/macro/MacroFlex.ll @@ -481,9 +481,7 @@ CONT \\\\ %% MacroFlex::MacroFlex(istream* in, ostream* out, bool no_line_macro_arg, vector<string> path_arg) - : MacroFlexLexer(in, out), input(in), no_line_macro(no_line_macro_arg), path(path_arg), - is_for_context(false), - reading_for_statement(false), reading_if_statement(false) + : MacroFlexLexer{in, out}, input{in}, no_line_macro{no_line_macro_arg}, path{path_arg} { }