diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-08 12:34:05 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-08 15:41:50 +0200 |
commit | ab9ff1405f9dd27addb6106e6d6e3ea45c730cc4 (patch) | |
tree | b7f2c3787752fb16f73b16e9e3343d2bf5e59d0f /src/utils/cpp | |
parent | 6f03f36201fa79f3802f3235779ec5a451287e21 (diff) | |
download | justbuild-ab9ff1405f9dd27addb6106e6d6e3ea45c730cc4.tar.gz |
Name constexpr variables using kCamelCase.
Diffstat (limited to 'src/utils/cpp')
-rw-r--r-- | src/utils/cpp/type_safe_arithmetic.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/cpp/type_safe_arithmetic.hpp b/src/utils/cpp/type_safe_arithmetic.hpp index 52efd81c..c647996a 100644 --- a/src/utils/cpp/type_safe_arithmetic.hpp +++ b/src/utils/cpp/type_safe_arithmetic.hpp @@ -39,9 +39,9 @@ struct TypeSafeArithmeticTag { using pointer_t = T*; using const_pointer_t = T const*; - static constexpr value_t max_value = MAX_VALUE; - static constexpr value_t min_value = MIN_VALUE; - static constexpr value_t smallest_value = SMALLEST_VALUE; + static constexpr value_t kMaxValue = MAX_VALUE; + static constexpr value_t kMinValue = MIN_VALUE; + static constexpr value_t kSmallestValue = SMALLEST_VALUE; }; /// \class TypeSafeArithmetic @@ -59,9 +59,9 @@ class TypeSafeArithmetic { using pointer_t = typename tag_t::pointer_t; using const_pointer_t = typename tag_t::const_pointer_t; - static constexpr value_t max_value = tag_t::max_value; - static constexpr value_t min_value = tag_t::min_value; - static constexpr value_t smallest_value = tag_t::smallest_value; + static constexpr value_t kMaxValue = tag_t::kMaxValue; + static constexpr value_t kMinValue = tag_t::kMinValue; + static constexpr value_t kSmallestValue = tag_t::kSmallestValue; constexpr TypeSafeArithmetic() = default; @@ -86,7 +86,7 @@ class TypeSafeArithmetic { constexpr auto get() const -> value_t { return m_value; } constexpr void set(value_t value) { - Expects(value >= min_value and value <= max_value and + Expects(value >= kMinValue and value <= kMaxValue and "value output of range"); m_value = value; } |