瀏覽代碼

any: clang-tidy docet

skypjack 10 月之前
父節點
當前提交
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 {
     union {
         const void *instance{};
+        // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
         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>
+// 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>> {};
 
 template<std::size_t Len, std::size_t Align>