diff --git a/src/macro/Directives.hh b/src/macro/Directives.hh index 67912c770e02293342a41d8a74eeebfc54a6bc71..a6b99038be3a0d78f91eacc35839a029011792c4 100644 --- a/src/macro/Directives.hh +++ b/src/macro/Directives.hh @@ -134,7 +134,7 @@ namespace macro class EchoMacroVars : public Directive { private: - bool save; + const bool save; public: EchoMacroVars(bool save_arg, Environment &env_arg, Tokenizer::location location_arg) : @@ -148,7 +148,7 @@ namespace macro private: const vector<VariablePtr> index_vec; const ExpressionPtr index_vals; - vector<DirectivePtr> statements; + const vector<DirectivePtr> statements; public: For(vector<VariablePtr> index_vec_arg, ExpressionPtr index_vals_arg, @@ -164,8 +164,8 @@ namespace macro { protected: const ExpressionPtr condition; - vector<DirectivePtr> if_statements; - vector<DirectivePtr> else_statements; + const vector<DirectivePtr> if_statements; + const vector<DirectivePtr> else_statements; public: If(ExpressionPtr condition_arg, vector<DirectivePtr> if_statements_arg, diff --git a/src/macro/Expressions.hh b/src/macro/Expressions.hh index d67daabff71a78d706460aea240920bb72eb3a1d..7ae6b8379a6d2ba26b7f0a98e0afe5b03050274c 100644 --- a/src/macro/Expressions.hh +++ b/src/macro/Expressions.hh @@ -197,7 +197,7 @@ namespace macro class Bool final : public BaseType { private: - bool value; + const bool value; public: Bool(bool value_arg, Environment &env_arg, Tokenizer::location location_arg = Tokenizer::location()) : @@ -231,7 +231,7 @@ namespace macro class Real final : public BaseType { private: - double value; + const double value; public: // Use strtod to handle extreme cases (e.g. 1e500, 1e-500), nan, inf // See Note in NumericalConstants::AddNonNegativeConstant @@ -326,7 +326,7 @@ namespace macro class String final : public BaseType { private: - string value; + const string value; public: String(string value_arg, Environment &env_arg, Tokenizer::location location_arg = Tokenizer::location()) : @@ -364,7 +364,7 @@ namespace macro class Tuple final : public BaseType { private: - vector<ExpressionPtr> tup; + const vector<ExpressionPtr> tup; public: Tuple(vector<ExpressionPtr> tup_arg, Environment &env_arg, Tokenizer::location location_arg = Tokenizer::location()) :