From b2e9ec205e3a7be32a6896762859c538b984b667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Fri, 1 Dec 2023 15:39:01 +0100 Subject: [PATCH] No longer use reserved identifiers for include guards Automatically detected using clang-tidy with bugprone-reserved-identifier check. By the way, homogeneize the define identifiers in relation to camel case convention. --- src/Bytecode.hh | 6 +++--- src/CommonEnums.hh | 8 ++++---- src/ComputingTasks.hh | 4 ++-- src/ConfigFile.hh | 6 +++--- src/DataTree.hh | 4 ++-- src/DynamicModel.hh | 4 ++-- src/EquationTags.hh | 4 ++-- src/ExprNode.hh | 4 ++-- src/ExtendedPreprocessorTypes.hh | 6 +++--- src/ExternalFunctionsTable.hh | 4 ++-- src/ModFile.hh | 6 +++--- src/ModelEquationBlock.hh | 6 +++--- src/ModelTree.hh | 4 ++-- src/NumericalConstants.hh | 4 ++-- src/NumericalInitialization.hh | 4 ++-- src/ParsingDriver.hh | 8 ++++---- src/Shocks.hh | 4 ++-- src/Statement.hh | 6 +++--- src/StaticModel.hh | 4 ++-- src/SubModel.hh | 4 ++-- src/SymbolList.hh | 4 ++-- src/SymbolTable.hh | 4 ++-- src/VariableDependencyGraph.hh | 6 +++--- src/WarningConsolidation.hh | 6 +++--- src/macro/Directives.hh | 6 +++--- src/macro/Driver.hh | 6 +++--- src/macro/Environment.hh | 4 ++-- src/macro/Expressions.hh | 4 ++-- src/macro/ForwardDeclarationsAndEnums.hh | 6 +++--- 29 files changed, 73 insertions(+), 73 deletions(-) diff --git a/src/Bytecode.hh b/src/Bytecode.hh index c89b6ece..9527870e 100644 --- a/src/Bytecode.hh +++ b/src/Bytecode.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _BYTECODE_HH -#define _BYTECODE_HH +#ifndef BYTECODE_HH +#define BYTECODE_HH #include #include @@ -1151,4 +1151,4 @@ BytecodeWriter& operator<<(BytecodeWriter& code_file, const FCALL_& instr); template<> BytecodeWriter& operator<<(BytecodeWriter& code_file, const FBEGINBLOCK_& instr); -#endif // _BYTECODE_HH +#endif diff --git a/src/CommonEnums.hh b/src/CommonEnums.hh index 7cd13f66..2b20225b 100644 --- a/src/CommonEnums.hh +++ b/src/CommonEnums.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2007-2022 Dynare Team + * Copyright © 2007-2023 Dynare Team * * This file is part of Dynare. * @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _COMMON_ENUMS_HH -#define _COMMON_ENUMS_HH +#ifndef COMMON_ENUMS_HH +#define COMMON_ENUMS_HH //! Enumeration of possible symbol types /*! Warning: do not to change existing values for 0 to 4: the values matter for homotopy_setup @@ -151,4 +151,4 @@ enum class PacTargetKind dd }; -#endif // _COMMON_ENUMS_HH +#endif diff --git a/src/ComputingTasks.hh b/src/ComputingTasks.hh index 73b9cf7e..05772bfc 100644 --- a/src/ComputingTasks.hh +++ b/src/ComputingTasks.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _COMPUTINGTASKS_HH -#define _COMPUTINGTASKS_HH +#ifndef COMPUTING_TASKS_HH +#define COMPUTING_TASKS_HH #include #include diff --git a/src/ConfigFile.hh b/src/ConfigFile.hh index 0ec61cf6..29db1bb1 100644 --- a/src/ConfigFile.hh +++ b/src/ConfigFile.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _CONFIG_FILE_HH -#define _CONFIG_FILE_HH +#ifndef CONFIG_FILE_HH +#define CONFIG_FILE_HH #include #include @@ -145,4 +145,4 @@ public: void writeEndParallel(ostream& output) const; }; -#endif // ! CONFIG_FILE_HH +#endif diff --git a/src/DataTree.hh b/src/DataTree.hh index b6cb39ff..93c2891f 100644 --- a/src/DataTree.hh +++ b/src/DataTree.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _DATATREE_HH -#define _DATATREE_HH +#ifndef DATA_TREE_HH +#define DATA_TREE_HH #include #include diff --git a/src/DynamicModel.hh b/src/DynamicModel.hh index 0dd374cc..e57efbaf 100644 --- a/src/DynamicModel.hh +++ b/src/DynamicModel.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _DYNAMICMODEL_HH -#define _DYNAMICMODEL_HH +#ifndef DYNAMIC_MODEL_HH +#define DYNAMIC_MODEL_HH #include #include diff --git a/src/EquationTags.hh b/src/EquationTags.hh index b5c7047d..998857cb 100644 --- a/src/EquationTags.hh +++ b/src/EquationTags.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _EQUATION_TAGS_HH -#define _EQUATION_TAGS_HH +#ifndef EQUATION_TAGS_HH +#define EQUATION_TAGS_HH #include #include diff --git a/src/ExprNode.hh b/src/ExprNode.hh index 5a8d7516..64adf4d6 100644 --- a/src/ExprNode.hh +++ b/src/ExprNode.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _EXPR_NODE_HH -#define _EXPR_NODE_HH +#ifndef EXPR_NODE_HH +#define EXPR_NODE_HH #include #include diff --git a/src/ExtendedPreprocessorTypes.hh b/src/ExtendedPreprocessorTypes.hh index 64da1cc9..79f9e9a6 100644 --- a/src/ExtendedPreprocessorTypes.hh +++ b/src/ExtendedPreprocessorTypes.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2014-2021 Dynare Team + * Copyright © 2014-2023 Dynare Team * * This file is part of Dynare. * @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _EXTENDED_PREPROCESSOR_TYPES_HH -#define _EXTENDED_PREPROCESSOR_TYPES_HH +#ifndef EXTENDED_PREPROCESSOR_TYPES_HH +#define EXTENDED_PREPROCESSOR_TYPES_HH // Values for the “output” option enum class OutputType diff --git a/src/ExternalFunctionsTable.hh b/src/ExternalFunctionsTable.hh index 23ecc8dc..40aadb51 100644 --- a/src/ExternalFunctionsTable.hh +++ b/src/ExternalFunctionsTable.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _EXTERNALFUNCTIONSTABLE_HH -#define _EXTERNALFUNCTIONSTABLE_HH +#ifndef EXTERNAL_FUNCTIONS_TABLE_HH +#define EXTERNAL_FUNCTIONS_TABLE_HH #include #include diff --git a/src/ModFile.hh b/src/ModFile.hh index a2779525..a1e15cec 100644 --- a/src/ModFile.hh +++ b/src/ModFile.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _MOD_FILE_HH -#define _MOD_FILE_HH +#ifndef MOD_FILE_HH +#define MOD_FILE_HH #include #include @@ -194,4 +194,4 @@ public: bool jsonderivsimple = false); }; -#endif // ! MOD_FILE_HH +#endif diff --git a/src/ModelEquationBlock.hh b/src/ModelEquationBlock.hh index d7931aae..aedf9e61 100644 --- a/src/ModelEquationBlock.hh +++ b/src/ModelEquationBlock.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2010-2022 Dynare Team + * Copyright © 2010-2023 Dynare Team * * This file is part of Dynare. * @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _MODEL_EQUATION_BLOCK_HH -#define _MODEL_EQUATION_BLOCK_HH +#ifndef MODEL_EQUATION_BLOCK_HH +#define MODEL_EQUATION_BLOCK_HH #include "DataTree.hh" #include "DynamicModel.hh" diff --git a/src/ModelTree.hh b/src/ModelTree.hh index 0a26ec35..2d361bbf 100644 --- a/src/ModelTree.hh +++ b/src/ModelTree.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _MODELTREE_HH -#define _MODELTREE_HH +#ifndef MODEL_TREE_HH +#define MODEL_TREE_HH #include #include diff --git a/src/NumericalConstants.hh b/src/NumericalConstants.hh index 0182ccb1..f03687c1 100644 --- a/src/NumericalConstants.hh +++ b/src/NumericalConstants.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _NUMERICALCONSTANTS_HH -#define _NUMERICALCONSTANTS_HH +#ifndef NUMERICAL_CONSTANTS_HH +#define NUMERICAL_CONSTANTS_HH #include #include diff --git a/src/NumericalInitialization.hh b/src/NumericalInitialization.hh index 0c87a0df..dcb6dec1 100644 --- a/src/NumericalInitialization.hh +++ b/src/NumericalInitialization.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _NUMERICALINITIALIZATION_HH -#define _NUMERICALINITIALIZATION_HH +#ifndef NUMERICAL_INITIALIZATION_HH +#define NUMERICAL_INITIALIZATION_HH #include #include diff --git a/src/ParsingDriver.hh b/src/ParsingDriver.hh index ece788de..78340582 100644 --- a/src/ParsingDriver.hh +++ b/src/ParsingDriver.hh @@ -17,10 +17,10 @@ * along with Dynare. If not, see . */ -#ifndef _PARSING_DRIVER_HH -#define _PARSING_DRIVER_HH +#ifndef PARSING_DRIVER_HH +#define PARSING_DRIVER_HH -#ifdef _MACRO_DRIVER_HH +#ifdef MACRO_DRIVER_HH # error Impossible to include both ParsingDriver.hh and macro/Driver.hh #endif @@ -964,4 +964,4 @@ public: } }; -#endif // ! PARSING_DRIVER_HH +#endif diff --git a/src/Shocks.hh b/src/Shocks.hh index f2b24295..9378f246 100644 --- a/src/Shocks.hh +++ b/src/Shocks.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _SHOCKS_HH -#define _SHOCKS_HH +#ifndef SHOCKS_HH +#define SHOCKS_HH #include #include diff --git a/src/Statement.hh b/src/Statement.hh index 06a3d589..b7c30fe0 100644 --- a/src/Statement.hh +++ b/src/Statement.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _STATEMENT_HH -#define _STATEMENT_HH +#ifndef STATEMENT_HH +#define STATEMENT_HH #include #include @@ -335,4 +335,4 @@ private: static constexpr bool always_false_v {false}; }; -#endif // ! _STATEMENT_HH +#endif diff --git a/src/StaticModel.hh b/src/StaticModel.hh index 30491f74..288c6e47 100644 --- a/src/StaticModel.hh +++ b/src/StaticModel.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _STATIC_MODEL_HH -#define _STATIC_MODEL_HH +#ifndef STATIC_MODEL_HH +#define STATIC_MODEL_HH #include #include diff --git a/src/SubModel.hh b/src/SubModel.hh index 2d482924..2d413848 100644 --- a/src/SubModel.hh +++ b/src/SubModel.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _SUBMODEL_HH -#define _SUBMODEL_HH +#ifndef SUB_MODEL_HH +#define SUB_MODEL_HH #include #include diff --git a/src/SymbolList.hh b/src/SymbolList.hh index d93ef4cd..9c96beb0 100644 --- a/src/SymbolList.hh +++ b/src/SymbolList.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _SYMBOL_LIST_HH -#define _SYMBOL_LIST_HH +#ifndef SYMBOL_LIST_HH +#define SYMBOL_LIST_HH #include #include diff --git a/src/SymbolTable.hh b/src/SymbolTable.hh index f381db60..fb41bb89 100644 --- a/src/SymbolTable.hh +++ b/src/SymbolTable.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _SYMBOLTABLE_HH -#define _SYMBOLTABLE_HH +#ifndef SYMBOL_TABLE_HH +#define SYMBOL_TABLE_HH #include #include diff --git a/src/VariableDependencyGraph.hh b/src/VariableDependencyGraph.hh index 83d935f2..9aabb8de 100644 --- a/src/VariableDependencyGraph.hh +++ b/src/VariableDependencyGraph.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _VARIABLEDEPENDENCYGRAPH_HH -#define _VARIABLEDEPENDENCYGRAPH_HH +#ifndef VARIABLE_DEPENDENCY_GRAPH_HH +#define VARIABLE_DEPENDENCY_GRAPH_HH #include #include @@ -94,4 +94,4 @@ private: bool suppressionOfVerticesWithLoop(set& feed_back_vertices); }; -#endif // _VARIABLEDEPENDENCYGRAPH_HH +#endif diff --git a/src/WarningConsolidation.hh b/src/WarningConsolidation.hh index b1e99c34..ac01f825 100644 --- a/src/WarningConsolidation.hh +++ b/src/WarningConsolidation.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2012-2017 Dynare Team + * Copyright © 2012-2023 Dynare Team * * This file is part of Dynare. * @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _WARNINGCONSOLIDATION_HH -#define _WARNINGCONSOLIDATION_HH +#ifndef WARNING_CONSOLIDATION_HH +#define WARNING_CONSOLIDATION_HH #include "DynareBisonLocation.hh" #include diff --git a/src/macro/Directives.hh b/src/macro/Directives.hh index 6d564e76..5a6ed0b5 100644 --- a/src/macro/Directives.hh +++ b/src/macro/Directives.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2019-2020 Dynare Team + * Copyright © 2019-2023 Dynare Team * * This file is part of Dynare. * @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _DIRECTIVES_HH -#define _DIRECTIVES_HH +#ifndef DIRECTIVES_HH +#define DIRECTIVES_HH #include "Expressions.hh" diff --git a/src/macro/Driver.hh b/src/macro/Driver.hh index f68afa23..034c03a4 100644 --- a/src/macro/Driver.hh +++ b/src/macro/Driver.hh @@ -17,10 +17,10 @@ * along with Dynare. If not, see . */ -#ifndef _MACRO_DRIVER_HH -#define _MACRO_DRIVER_HH +#ifndef MACRO_DRIVER_HH +#define MACRO_DRIVER_HH -#ifdef _PARSING_DRIVER_HH +#ifdef PARSING_DRIVER_HH # error Impossible to include both ../ParsingDriver.hh and Driver.hh #endif diff --git a/src/macro/Environment.hh b/src/macro/Environment.hh index f22565aa..a3f2cdfc 100644 --- a/src/macro/Environment.hh +++ b/src/macro/Environment.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _ENVIRONMENT_HH -#define _ENVIRONMENT_HH +#ifndef ENVIRONMENT_HH +#define ENVIRONMENT_HH #include "ForwardDeclarationsAndEnums.hh" diff --git a/src/macro/Expressions.hh b/src/macro/Expressions.hh index d213741d..1545291c 100644 --- a/src/macro/Expressions.hh +++ b/src/macro/Expressions.hh @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _EXPRESSIONS_HH -#define _EXPRESSIONS_HH +#ifndef EXPRESSIONS_HH +#define EXPRESSIONS_HH #include "Environment.hh" #include "ForwardDeclarationsAndEnums.hh" diff --git a/src/macro/ForwardDeclarationsAndEnums.hh b/src/macro/ForwardDeclarationsAndEnums.hh index 28425393..b0e8835c 100644 --- a/src/macro/ForwardDeclarationsAndEnums.hh +++ b/src/macro/ForwardDeclarationsAndEnums.hh @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Dynare Team + * Copyright © 2019-2023 Dynare Team * * This file is part of Dynare. * @@ -17,8 +17,8 @@ * along with Dynare. If not, see . */ -#ifndef _FORWARDDECLARATIONSANDENUMS_HH -#define _FORWARDDECLARATIONSANDENUMS_HH +#ifndef FORWARD_DECLARATIONS_AND_ENUMS_HH +#define FORWARD_DECLARATIONS_AND_ENUMS_HH #include