From 2f0d2932a76657a94012924e1f31288b15b86291 Mon Sep 17 00:00:00 2001 From: Jakob Gamper <97gamjak@gmail.com> Date: Sat, 20 Dec 2025 22:47:16 +0100 Subject: [PATCH 1/2] feat: add header guards according to filepath and update related files --- .devops.toml | 1 + .vscode/settings.json | 3 ++- external/devops | 2 +- include/mstd/compile.hpp | 6 +++--- include/mstd/enum.hpp | 6 +++--- include/mstd/error.hpp | 6 +++--- include/mstd/functional.hpp | 6 +++--- include/mstd/math.hpp | 6 +++--- include/mstd/math/power.hpp | 6 +++--- include/mstd/pack.hpp | 6 +++--- include/mstd/pack/integer_pack.hpp | 6 +++--- include/mstd/pack/integer_pack_details.hpp | 12 ++++++------ include/mstd/pack/integer_pack_operations.hpp | 6 +++--- include/mstd/pack/ratio_pack.hpp | 6 +++--- include/mstd/pack/ratio_pack_details.hpp | 6 +++--- include/mstd/pack/ratio_pack_operations.hpp | 6 +++--- include/mstd/quantity.hpp | 6 +++--- include/mstd/quantity/dim.hpp | 6 +++--- include/mstd/quantity/dim_details.hpp | 6 +++--- include/mstd/quantity/dim_impl.hpp | 6 +++--- include/mstd/quantity/dim_operations.hpp | 6 +++--- include/mstd/quantity/dim_ratio.hpp | 6 +++--- include/mstd/quantity/dim_ratio_details.hpp | 6 +++--- include/mstd/quantity/dim_ratio_impl.hpp | 6 +++--- include/mstd/quantity/dim_ratio_operations.hpp | 6 +++--- include/mstd/quantity/enums.hpp | 6 +++--- include/mstd/quantity/quantity.hpp | 6 +++--- include/mstd/quantity/quantity_impl.hpp | 6 +++--- include/mstd/quantity/unit.hpp | 6 +++--- include/mstd/quantity/unit_details.hpp | 6 +++--- include/mstd/quantity/unit_impl.hpp | 6 +++--- include/mstd/quantity/unit_operations.hpp | 6 +++--- include/mstd/ratio.hpp | 6 +++--- include/mstd/type_traits.hpp | 6 +++--- include/mstd/type_traits/pack_traits.hpp | 6 +++--- include/mstd/type_traits/quantity_traits.hpp | 6 +++--- include/mstd/type_traits/ratio_traits.hpp | 6 +++--- scripts/cppcheck.sh | 2 ++ test/quantity/test_utils.hpp | 6 +++--- 39 files changed, 114 insertions(+), 110 deletions(-) diff --git a/.devops.toml b/.devops.toml index 185a95c..de78e83 100644 --- a/.devops.toml +++ b/.devops.toml @@ -18,6 +18,7 @@ buggy_cpp_macros = ["MSTD_WARN_BUGGY_HEADER", "MSTD_WARN_BUGGY_LIBRARY"] #license_header_check = true #check_only_staged_files = false license_header = "config/licenseHeader.txt" +header_guards_according_to_filepath = true [file] #encoding = "utf-8" diff --git a/.vscode/settings.json b/.vscode/settings.json index b376aa1..e3381ec 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -108,6 +108,7 @@ "__nullptr": "cpp", "csignal": "cpp", "list": "cpp", - "text_encoding": "cpp" + "text_encoding": "cpp", + "__locale": "cpp" }, } \ No newline at end of file diff --git a/external/devops b/external/devops index 7d38a4d..c3be8da 160000 --- a/external/devops +++ b/external/devops @@ -1 +1 @@ -Subproject commit 7d38a4d40ec2cbabc8a43312fc9e675c2d9ccde0 +Subproject commit c3be8da2dfa9abc382d8680746c7ca411f6fc7ea diff --git a/include/mstd/compile.hpp b/include/mstd/compile.hpp index 34c8b09..bae2261 100644 --- a/include/mstd/compile.hpp +++ b/include/mstd/compile.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_COMPILE_HPP__ -#define __MSTD_COMPILE_HPP__ +#ifndef __MSTD__COMPILE_HPP__ +#define __MSTD__COMPILE_HPP__ /** * @brief Ignore buggy code @@ -40,4 +40,4 @@ #define MSTD_IGNORE_BUGGY_CODE 0 #endif -#endif // __MSTD_COMPILE_HPP__ \ No newline at end of file +#endif // __MSTD__COMPILE_HPP__ \ No newline at end of file diff --git a/include/mstd/enum.hpp b/include/mstd/enum.hpp index 9b9d186..ae3e432 100644 --- a/include/mstd/enum.hpp +++ b/include/mstd/enum.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_ENUM_HPP__ -#define __MSTD_ENUM_HPP__ +#ifndef __MSTD__ENUM_HPP__ +#define __MSTD__ENUM_HPP__ #include // IWYU pragma: keep #include // IWYU pragma: keep @@ -100,4 +100,4 @@ } \ }; -#endif // __MSTD_ENUM_HPP__ \ No newline at end of file +#endif // __MSTD__ENUM_HPP__ \ No newline at end of file diff --git a/include/mstd/error.hpp b/include/mstd/error.hpp index 90f18e2..40215ab 100644 --- a/include/mstd/error.hpp +++ b/include/mstd/error.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_ERROR_HPP__ -#define __MSTD_ERROR_HPP__ +#ifndef __MSTD__ERROR_HPP__ +#define __MSTD__ERROR_HPP__ #include @@ -79,4 +79,4 @@ namespace mstd #endif -#endif // __MSTD_ERROR_HPP__ \ No newline at end of file +#endif // __MSTD__ERROR_HPP__ \ No newline at end of file diff --git a/include/mstd/functional.hpp b/include/mstd/functional.hpp index efb11c4..2d04802 100644 --- a/include/mstd/functional.hpp +++ b/include/mstd/functional.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __FUNCTIONAL_HPP__ -#define __FUNCTIONAL_HPP__ +#ifndef __MSTD__FUNCTIONAL_HPP__ +#define __MSTD__FUNCTIONAL_HPP__ namespace mstd { @@ -56,4 +56,4 @@ namespace mstd } // namespace mstd -#endif // __FUNCTIONAL_HPP__ \ No newline at end of file +#endif // __MSTD__FUNCTIONAL_HPP__ \ No newline at end of file diff --git a/include/mstd/math.hpp b/include/mstd/math.hpp index 6685d2e..94b1d46 100644 --- a/include/mstd/math.hpp +++ b/include/mstd/math.hpp @@ -20,9 +20,9 @@ ******************************************************************************/ -#ifndef __MSTD_MATH_HPP__ -#define __MSTD_MATH_HPP__ +#ifndef __MSTD__MATH_HPP__ +#define __MSTD__MATH_HPP__ #include "math/power.hpp" // IWYU pragma: export -#endif // __MSTD_MATH_HPP__ \ No newline at end of file +#endif // __MSTD__MATH_HPP__ \ No newline at end of file diff --git a/include/mstd/math/power.hpp b/include/mstd/math/power.hpp index d6b57b0..222fa32 100644 --- a/include/mstd/math/power.hpp +++ b/include/mstd/math/power.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_MATH_POWER_HPP__ -#define __MSTD_MATH_POWER_HPP__ +#ifndef __MSTD__MATH__POWER_HPP__ +#define __MSTD__MATH__POWER_HPP__ #include @@ -80,4 +80,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_MATH_POWER_HPP__ +#endif // __MSTD__MATH__POWER_HPP__ diff --git a/include/mstd/pack.hpp b/include/mstd/pack.hpp index a20f7e8..92c7f5c 100644 --- a/include/mstd/pack.hpp +++ b/include/mstd/pack.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_PACK_HPP__ -#define __MSTD_PACK_HPP__ +#ifndef __MSTD__PACK_HPP__ +#define __MSTD__PACK_HPP__ #include "pack/integer_pack.hpp" // IWYU pragma: export #include "pack/integer_pack_operations.hpp" // IWYU pragma: export @@ -29,4 +29,4 @@ #include "pack/ratio_pack_operations.hpp" // IWYU pragma: export #include "type_traits/pack_traits.hpp" // IWYU pragma: export -#endif // __MSTD_PACK_HPP__ \ No newline at end of file +#endif // __MSTD__PACK_HPP__ \ No newline at end of file diff --git a/include/mstd/pack/integer_pack.hpp b/include/mstd/pack/integer_pack.hpp index 0dfa0c8..9490875 100644 --- a/include/mstd/pack/integer_pack.hpp +++ b/include/mstd/pack/integer_pack.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_INTEGER_PACK_HPP__ -#define __MSTD_INTEGER_PACK_HPP__ +#ifndef __MSTD__PACK__INTEGER_PACK_HPP__ +#define __MSTD__PACK__INTEGER_PACK_HPP__ #include #include @@ -99,4 +99,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_INTEGER_PACK_HPP__ +#endif // __MSTD__PACK__INTEGER_PACK_HPP__ diff --git a/include/mstd/pack/integer_pack_details.hpp b/include/mstd/pack/integer_pack_details.hpp index 2da5c9f..f7527e7 100644 --- a/include/mstd/pack/integer_pack_details.hpp +++ b/include/mstd/pack/integer_pack_details.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_INTEGER_PACK_DETAILS_HPP__ -#define __MSTD_INTEGER_PACK_DETAILS_HPP__ +#ifndef __MSTD__PACK__INTEGER_PACK_DETAILS_HPP__ +#define __MSTD__PACK__INTEGER_PACK_DETAILS_HPP__ #include #include @@ -114,9 +114,9 @@ namespace mstd * @tparam F The function to apply. */ template - using pack_zip_t = decltype(pack_zip_impl( - std::make_index_sequence{} - )); + using pack_zip_t = + decltype(pack_zip_impl(std::make_index_sequence{}) + ); /********************* * * @@ -158,4 +158,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_INTEGER_PACK_DETAILS_HPP__ +#endif // __MSTD__PACK__INTEGER_PACK_DETAILS_HPP__ diff --git a/include/mstd/pack/integer_pack_operations.hpp b/include/mstd/pack/integer_pack_operations.hpp index 2b2b600..8c877ad 100644 --- a/include/mstd/pack/integer_pack_operations.hpp +++ b/include/mstd/pack/integer_pack_operations.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_INTEGER_PACK_OPERATIONS_HPP__ -#define __MSTD_INTEGER_PACK_OPERATIONS_HPP__ +#ifndef __MSTD__PACK__INTEGER_PACK_OPERATIONS_HPP__ +#define __MSTD__PACK__INTEGER_PACK_OPERATIONS_HPP__ #include "integer_pack.hpp" #include "integer_pack_details.hpp" @@ -60,4 +60,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_INTEGER_PACK_OPERATIONS_HPP__ \ No newline at end of file +#endif // __MSTD__PACK__INTEGER_PACK_OPERATIONS_HPP__ \ No newline at end of file diff --git a/include/mstd/pack/ratio_pack.hpp b/include/mstd/pack/ratio_pack.hpp index 4ca5ccd..6c6ca0a 100644 --- a/include/mstd/pack/ratio_pack.hpp +++ b/include/mstd/pack/ratio_pack.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_RATIO_PACK_HPP__ -#define __MSTD_RATIO_PACK_HPP__ +#ifndef __MSTD__PACK__RATIO_PACK_HPP__ +#define __MSTD__PACK__RATIO_PACK_HPP__ #include #include @@ -87,4 +87,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_RATIO_PACK_HPP__ +#endif // __MSTD__PACK__RATIO_PACK_HPP__ diff --git a/include/mstd/pack/ratio_pack_details.hpp b/include/mstd/pack/ratio_pack_details.hpp index a9c7360..da9cb58 100644 --- a/include/mstd/pack/ratio_pack_details.hpp +++ b/include/mstd/pack/ratio_pack_details.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_RATIO_PACK_DETAILS_HPP__ -#define __MSTD_RATIO_PACK_DETAILS_HPP__ +#ifndef __MSTD__PACK__RATIO_PACK_DETAILS_HPP__ +#define __MSTD__PACK__RATIO_PACK_DETAILS_HPP__ #include #include @@ -129,4 +129,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_RATIO_PACK_DETAILS_HPP__ +#endif // __MSTD__PACK__RATIO_PACK_DETAILS_HPP__ diff --git a/include/mstd/pack/ratio_pack_operations.hpp b/include/mstd/pack/ratio_pack_operations.hpp index def54af..2742a7e 100644 --- a/include/mstd/pack/ratio_pack_operations.hpp +++ b/include/mstd/pack/ratio_pack_operations.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_RATIO_PACK_OPERATIONS_HPP__ -#define __MSTD_RATIO_PACK_OPERATIONS_HPP__ +#ifndef __MSTD__PACK__RATIO_PACK_OPERATIONS_HPP__ +#define __MSTD__PACK__RATIO_PACK_OPERATIONS_HPP__ #include "ratio_pack.hpp" #include "ratio_pack_details.hpp" @@ -82,4 +82,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_RATIO_PACK_OPERATIONS_HPP__ \ No newline at end of file +#endif // __MSTD__PACK__RATIO_PACK_OPERATIONS_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity.hpp b/include/mstd/quantity.hpp index 1ada8cb..4921cd6 100644 --- a/include/mstd/quantity.hpp +++ b/include/mstd/quantity.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_HPP__ -#define __MSTD_UNITS_HPP__ +#ifndef __MSTD__QUANTITY_HPP__ +#define __MSTD__QUANTITY_HPP__ #include "mstd/error.hpp" // IWYU pragma: export @@ -36,4 +36,4 @@ MSTD_WARN_BUGGY_LIBRARY("mstd/quantity.hpp") #include "quantity/unit_impl.hpp" // IWYU pragma: export #include "quantity/unit_operations.hpp" // IWYU pragma: export -#endif // __MSTD_UNITS_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim.hpp b/include/mstd/quantity/dim.hpp index d7af790..3f0bd5a 100644 --- a/include/mstd/quantity/dim.hpp +++ b/include/mstd/quantity/dim.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_DIMENSION_HPP__ -#define __MSTD_UNITS_DIMENSION_HPP__ +#ifndef __MSTD__QUANTITY__DIM_HPP__ +#define __MSTD__QUANTITY__DIM_HPP__ #include "mstd/error.hpp" @@ -124,4 +124,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNITS_DIMENSION_HPP__ +#endif // __MSTD__QUANTITY__DIM_HPP__ diff --git a/include/mstd/quantity/dim_details.hpp b/include/mstd/quantity/dim_details.hpp index 76ca756..f2e219f 100644 --- a/include/mstd/quantity/dim_details.hpp +++ b/include/mstd/quantity/dim_details.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIM_DETAILS_HPP__ -#define __MSTD_DIM_DETAILS_HPP__ +#ifndef __MSTD__QUANTITY__DIM_DETAILS_HPP__ +#define __MSTD__QUANTITY__DIM_DETAILS_HPP__ #include "mstd/error.hpp" @@ -104,4 +104,4 @@ namespace mstd } // namespace details } // namespace mstd -#endif // __MSTD_DIM_DETAILS_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_DETAILS_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim_impl.hpp b/include/mstd/quantity/dim_impl.hpp index 732ae73..5d1909e 100644 --- a/include/mstd/quantity/dim_impl.hpp +++ b/include/mstd/quantity/dim_impl.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIMENSION_IMPL_HPP__ -#define __MSTD_DIMENSION_IMPL_HPP__ +#ifndef __MSTD__QUANTITY__DIM_IMPL_HPP__ +#define __MSTD__QUANTITY__DIM_IMPL_HPP__ #include "mstd/error.hpp" @@ -129,4 +129,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_DIMENSION_IMPL_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_IMPL_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim_operations.hpp b/include/mstd/quantity/dim_operations.hpp index b8f51ad..e28570e 100644 --- a/include/mstd/quantity/dim_operations.hpp +++ b/include/mstd/quantity/dim_operations.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIM_OPERATIONS_HPP__ -#define __MSTD_DIM_OPERATIONS_HPP__ +#ifndef __MSTD__QUANTITY__DIM_OPERATIONS_HPP__ +#define __MSTD__QUANTITY__DIM_OPERATIONS_HPP__ #include "mstd/error.hpp" @@ -75,4 +75,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_DIM_OPERATIONS_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_OPERATIONS_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim_ratio.hpp b/include/mstd/quantity/dim_ratio.hpp index 87256ba..2584d00 100644 --- a/include/mstd/quantity/dim_ratio.hpp +++ b/include/mstd/quantity/dim_ratio.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIM_RATIO_HPP__ -#define __MSTD_DIM_RATIO_HPP__ +#ifndef __MSTD__QUANTITY__DIM_RATIO_HPP__ +#define __MSTD__QUANTITY__DIM_RATIO_HPP__ #include "mstd/error.hpp" @@ -111,4 +111,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_DIM_RATIO_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_RATIO_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim_ratio_details.hpp b/include/mstd/quantity/dim_ratio_details.hpp index 69783a4..068d2c3 100644 --- a/include/mstd/quantity/dim_ratio_details.hpp +++ b/include/mstd/quantity/dim_ratio_details.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIM_RATIO_DETAILS_HPP__ -#define __MSTD_DIM_RATIO_DETAILS_HPP__ +#ifndef __MSTD__QUANTITY__DIM_RATIO_DETAILS_HPP__ +#define __MSTD__QUANTITY__DIM_RATIO_DETAILS_HPP__ #include "mstd/error.hpp" @@ -89,4 +89,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_DIM_RATIO_DETAILS_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_RATIO_DETAILS_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim_ratio_impl.hpp b/include/mstd/quantity/dim_ratio_impl.hpp index b85084d..4d5bcdd 100644 --- a/include/mstd/quantity/dim_ratio_impl.hpp +++ b/include/mstd/quantity/dim_ratio_impl.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIM_RATIO_IMPL_HPP__ -#define __MSTD_DIM_RATIO_IMPL_HPP__ +#ifndef __MSTD__QUANTITY__DIM_RATIO_IMPL_HPP__ +#define __MSTD__QUANTITY__DIM_RATIO_IMPL_HPP__ #include "mstd/error.hpp" @@ -115,4 +115,4 @@ namespace mstd using angle_dim_ratio = typename angle_dim_ratio_impl::type; } // namespace mstd -#endif // __MSTD_DIM_RATIO_IMPL_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_RATIO_IMPL_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/dim_ratio_operations.hpp b/include/mstd/quantity/dim_ratio_operations.hpp index 63cdec8..ee1625c 100644 --- a/include/mstd/quantity/dim_ratio_operations.hpp +++ b/include/mstd/quantity/dim_ratio_operations.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_DIM_RATIO_OPERATIONS_HPP__ -#define __MSTD_DIM_RATIO_OPERATIONS_HPP__ +#ifndef __MSTD__QUANTITY__DIM_RATIO_OPERATIONS_HPP__ +#define __MSTD__QUANTITY__DIM_RATIO_OPERATIONS_HPP__ #include "mstd/error.hpp" @@ -87,4 +87,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_DIM_RATIO_OPERATIONS_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__DIM_RATIO_OPERATIONS_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/enums.hpp b/include/mstd/quantity/enums.hpp index aa10c83..ab2ca1a 100644 --- a/include/mstd/quantity/enums.hpp +++ b/include/mstd/quantity/enums.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_ENUMS_HPP__ -#define __MSTD_UNITS_ENUMS_HPP__ +#ifndef __MSTD__QUANTITY__ENUMS_HPP__ +#define __MSTD__QUANTITY__ENUMS_HPP__ #include "mstd/error.hpp" @@ -85,4 +85,4 @@ namespace mstd // NOLINTEND } // namespace mstd -#endif // __MSTD_UNITS_ENUMS_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__ENUMS_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/quantity.hpp b/include/mstd/quantity/quantity.hpp index c7ed4cb..f1fed49 100644 --- a/include/mstd/quantity/quantity.hpp +++ b/include/mstd/quantity/quantity.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_QUANTITY_HPP__ -#define __MSTD_UNITS_QUANTITY_HPP__ +#ifndef __MSTD__QUANTITY__QUANTITY_HPP__ +#define __MSTD__QUANTITY__QUANTITY_HPP__ #include "mstd/error.hpp" @@ -365,4 +365,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNITS_QUANTITY_HPP__ +#endif // __MSTD__QUANTITY__QUANTITY_HPP__ diff --git a/include/mstd/quantity/quantity_impl.hpp b/include/mstd/quantity/quantity_impl.hpp index 3294473..4821440 100644 --- a/include/mstd/quantity/quantity_impl.hpp +++ b/include/mstd/quantity/quantity_impl.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_QUANTITY_IMPL_HPP__ -#define __MSTD_UNITS_QUANTITY_IMPL_HPP__ +#ifndef __MSTD__QUANTITY__QUANTITY_IMPL_HPP__ +#define __MSTD__QUANTITY__QUANTITY_IMPL_HPP__ #include "mstd/error.hpp" @@ -97,4 +97,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNITS_QUANTITY_IMPL_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__QUANTITY_IMPL_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/unit.hpp b/include/mstd/quantity/unit.hpp index 9627bb8..b7210f8 100644 --- a/include/mstd/quantity/unit.hpp +++ b/include/mstd/quantity/unit.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_UNIT_HPP__ -#define __MSTD_UNITS_UNIT_HPP__ +#ifndef __MSTD__QUANTITY__UNIT_HPP__ +#define __MSTD__QUANTITY__UNIT_HPP__ #include "mstd/error.hpp" @@ -83,4 +83,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNITS_UNIT_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__UNIT_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/unit_details.hpp b/include/mstd/quantity/unit_details.hpp index 2953ad4..6931004 100644 --- a/include/mstd/quantity/unit_details.hpp +++ b/include/mstd/quantity/unit_details.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_DETAILS_HPP__ -#define __MSTD_UNITS_DETAILS_HPP__ +#ifndef __MSTD__QUANTITY__UNIT_DETAILS_HPP__ +#define __MSTD__QUANTITY__UNIT_DETAILS_HPP__ #include "mstd/error.hpp" @@ -238,4 +238,4 @@ namespace mstd::details } // namespace mstd::details -#endif // __MSTD_UNITS_DETAILS_HPP__ +#endif // __MSTD__QUANTITY__UNIT_DETAILS_HPP__ diff --git a/include/mstd/quantity/unit_impl.hpp b/include/mstd/quantity/unit_impl.hpp index 272a516..9d65afd 100644 --- a/include/mstd/quantity/unit_impl.hpp +++ b/include/mstd/quantity/unit_impl.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNIT_IMPL_HPP__ -#define __MSTD_UNIT_IMPL_HPP__ +#ifndef __MSTD__QUANTITY__UNIT_IMPL_HPP__ +#define __MSTD__QUANTITY__UNIT_IMPL_HPP__ #include "mstd/error.hpp" @@ -208,4 +208,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNIT_IMPL_HPP__ \ No newline at end of file +#endif // __MSTD__QUANTITY__UNIT_IMPL_HPP__ \ No newline at end of file diff --git a/include/mstd/quantity/unit_operations.hpp b/include/mstd/quantity/unit_operations.hpp index 659595c..dc132ea 100644 --- a/include/mstd/quantity/unit_operations.hpp +++ b/include/mstd/quantity/unit_operations.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNIT_OPERATIONS_HPP__ -#define __MSTD_UNIT_OPERATIONS_HPP__ +#ifndef __MSTD__QUANTITY__UNIT_OPERATIONS_HPP__ +#define __MSTD__QUANTITY__UNIT_OPERATIONS_HPP__ #include "mstd/error.hpp" @@ -133,4 +133,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNIT_OPERATIONS_HPP__ +#endif // __MSTD__QUANTITY__UNIT_OPERATIONS_HPP__ diff --git a/include/mstd/ratio.hpp b/include/mstd/ratio.hpp index 612c4e5..4e827b1 100644 --- a/include/mstd/ratio.hpp +++ b/include/mstd/ratio.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_UNITS_RATIO_HPP__ -#define __MSTD_UNITS_RATIO_HPP__ +#ifndef __MSTD__RATIO_HPP__ +#define __MSTD__RATIO_HPP__ #include #include @@ -120,4 +120,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_UNITS_RATIO_HPP__ \ No newline at end of file +#endif // __MSTD__RATIO_HPP__ \ No newline at end of file diff --git a/include/mstd/type_traits.hpp b/include/mstd/type_traits.hpp index af73ccc..913f14e 100644 --- a/include/mstd/type_traits.hpp +++ b/include/mstd/type_traits.hpp @@ -20,12 +20,12 @@ ******************************************************************************/ -#ifndef __MSTD_TYPE_TRAITS_HPP__ -#define __MSTD_TYPE_TRAITS_HPP__ +#ifndef __MSTD__TYPE_TRAITS_HPP__ +#define __MSTD__TYPE_TRAITS_HPP__ #include "type_traits/math_traits.hpp" // IWYU pragma: export #include "type_traits/pack_traits.hpp" // IWYU pragma: export #include "type_traits/quantity_traits.hpp" // IWYU pragma: export #include "type_traits/ratio_traits.hpp" // IWYU pragma: export -#endif // __MSTD_TYPE_TRAITS_HPP__ \ No newline at end of file +#endif // __MSTD__TYPE_TRAITS_HPP__ \ No newline at end of file diff --git a/include/mstd/type_traits/pack_traits.hpp b/include/mstd/type_traits/pack_traits.hpp index 10ef53a..670f399 100644 --- a/include/mstd/type_traits/pack_traits.hpp +++ b/include/mstd/type_traits/pack_traits.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_PACK_TRAITS_HPP__ -#define __MSTD_PACK_TRAITS_HPP__ +#ifndef __MSTD__TYPE_TRAITS__PACK_TRAITS_HPP__ +#define __MSTD__TYPE_TRAITS__PACK_TRAITS_HPP__ #include "ratio_traits.hpp" @@ -64,4 +64,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_PACK_TRAITS_HPP__ \ No newline at end of file +#endif // __MSTD__TYPE_TRAITS__PACK_TRAITS_HPP__ \ No newline at end of file diff --git a/include/mstd/type_traits/quantity_traits.hpp b/include/mstd/type_traits/quantity_traits.hpp index adacc7c..90b2f01 100644 --- a/include/mstd/type_traits/quantity_traits.hpp +++ b/include/mstd/type_traits/quantity_traits.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_TYPE_TRAITS_QUANTITY_TRAITS_HPP__ -#define __MSTD_TYPE_TRAITS_QUANTITY_TRAITS_HPP__ +#ifndef __MSTD__TYPE_TRAITS__QUANTITY_TRAITS_HPP__ +#define __MSTD__TYPE_TRAITS__QUANTITY_TRAITS_HPP__ #include "pack_traits.hpp" #include "ratio_traits.hpp" @@ -125,4 +125,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_TYPE_TRAITS_QUANTITY_TRAITS_HPP__ \ No newline at end of file +#endif // __MSTD__TYPE_TRAITS__QUANTITY_TRAITS_HPP__ \ No newline at end of file diff --git a/include/mstd/type_traits/ratio_traits.hpp b/include/mstd/type_traits/ratio_traits.hpp index a1a85cf..b7ab7d5 100644 --- a/include/mstd/type_traits/ratio_traits.hpp +++ b/include/mstd/type_traits/ratio_traits.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_RATIO_TRAITS_HPP__ -#define __MSTD_RATIO_TRAITS_HPP__ +#ifndef __MSTD__TYPE_TRAITS__RATIO_TRAITS_HPP__ +#define __MSTD__TYPE_TRAITS__RATIO_TRAITS_HPP__ /** * @file ratio_traits.hpp @@ -50,4 +50,4 @@ namespace mstd } // namespace mstd -#endif // __MSTD_RATIO_TRAITS_HPP__ \ No newline at end of file +#endif // __MSTD__TYPE_TRAITS__RATIO_TRAITS_HPP__ \ No newline at end of file diff --git a/scripts/cppcheck.sh b/scripts/cppcheck.sh index 94769a7..7bd72cf 100755 --- a/scripts/cppcheck.sh +++ b/scripts/cppcheck.sh @@ -10,3 +10,5 @@ cppcheck --enable=all \ --inconclusive \ -I include \ include test + +cpp_checks --dirs include --dirs test diff --git a/test/quantity/test_utils.hpp b/test/quantity/test_utils.hpp index 6b61afb..23479e5 100644 --- a/test/quantity/test_utils.hpp +++ b/test/quantity/test_utils.hpp @@ -20,8 +20,8 @@ ******************************************************************************/ -#ifndef __MSTD_TEST_UTILS_HPP__ -#define __MSTD_TEST_UTILS_HPP__ +#ifndef __QUANTITY__TEST_UTILS_HPP__ +#define __QUANTITY__TEST_UTILS_HPP__ #include @@ -30,4 +30,4 @@ STATIC_REQUIRE(__VA_ARGS__) \ /* NOLINTEND */ -#endif // __MSTD_TEST_UTILS_HPP__ +#endif // __QUANTITY__TEST_UTILS_HPP__ From b0d66e39f8d27a883ddb8b3c218aeb9bddebcb81 Mon Sep 17 00:00:00 2001 From: Jakob Gamper <97gamjak@gmail.com> Date: Sat, 20 Dec 2025 22:50:23 +0100 Subject: [PATCH 2/2] chore: cleanup header guards to adhere to folder and file structure --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e359c..301d2b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ All notable changes to this project will be documented in this file. - Add exhaustive error flags for compilation - Add checking of doxygen comments via building docs (no docs is building for gh pages - yet) +### Cleanup + +- Cleanup header guards to follow common rule with folder and file structure + ## [0.0.2](https://github.com/97gamjak/mstd/releases/tag/0.0.2) - 2025-11-20