ソースを参照

bit: suppress a wrong warning for bugprone-assert-side-effect

Michele Caini 1 年間 前
コミット
2fb2ace002
1 ファイル変更1 行追加0 行削除
  1. 1 0
      src/entt/core/bit.hpp

+ 1 - 0
src/entt/core/bit.hpp

@@ -41,6 +41,7 @@ template<typename Type>
  */
  */
 template<typename Type>
 template<typename Type>
 [[nodiscard]] constexpr std::enable_if_t<std::is_unsigned_v<Type>, Type> next_power_of_two(const Type value) noexcept {
 [[nodiscard]] constexpr std::enable_if_t<std::is_unsigned_v<Type>, Type> next_power_of_two(const Type value) noexcept {
+    // NOLINTNEXTLINE(bugprone-assert-side-effect)
     ENTT_ASSERT_CONSTEXPR(value < (Type{1u} << (std::numeric_limits<Type>::digits - 1)), "Numeric limits exceeded");
     ENTT_ASSERT_CONSTEXPR(value < (Type{1u} << (std::numeric_limits<Type>::digits - 1)), "Numeric limits exceeded");
     Type curr = value - (value != 0u);
     Type curr = value - (value != 0u);