فهرست منبع

any: clang-tidy docet

skypjack 5 ماه پیش
والد
کامیت
47c65a20a1
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/entt/core/any.hpp

+ 2 - 0
src/entt/core/any.hpp

@@ -30,6 +30,7 @@ template<std::size_t Len, std::size_t Align>
 struct basic_any_storage {
 struct basic_any_storage {
     union {
     union {
         const void *instance{};
         const void *instance{};
+        // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
         alignas(Align) std::byte buffer[Len];
         alignas(Align) std::byte buffer[Len];
     };
     };
 };
 };
@@ -40,6 +41,7 @@ struct basic_any_storage<0u, Align> {
 };
 };
 
 
 template<typename Type, std::size_t Len, std::size_t Align>
 template<typename Type, std::size_t Len, std::size_t Align>
+// NOLINTNEXTLINE(bugprone-sizeof-expression)
 struct in_situ: std::bool_constant<(Len != 0u) && alignof(Type) <= Align && sizeof(Type) <= Len && std::is_nothrow_move_constructible_v<Type>> {};
 struct in_situ: std::bool_constant<(Len != 0u) && alignof(Type) <= Align && sizeof(Type) <= Len && std::is_nothrow_move_constructible_v<Type>> {};
 
 
 template<std::size_t Len, std::size_t Align>
 template<std::size_t Len, std::size_t Align>