From 59d9249854f1f588dc9e7a79549fe954bcd8a5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Wed, 24 Sep 2025 20:06:27 -0700 Subject: [PATCH] Cleanup. --- include/bx/inline/hash.inl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/bx/inline/hash.inl b/include/bx/inline/hash.inl index 62eb5fc..63d078a 100644 --- a/include/bx/inline/hash.inl +++ b/include/bx/inline/hash.inl @@ -61,6 +61,8 @@ namespace bx template inline void HashCrc32::add(const Ty& _data) { + static_assert(isTriviallyCopyable(), "Ty must be trivially copyable type."); + add(&_data, sizeof(Ty) ); } @@ -91,6 +93,8 @@ namespace bx template inline void HashMurmur2A::add(const Ty& _data) { + static_assert(isTriviallyCopyable(), "Ty must be trivially copyable type."); + add(&_data, sizeof(Ty) ); } @@ -115,6 +119,8 @@ namespace bx template inline void HashMurmur3::add(const Ty& _data) { + static_assert(isTriviallyCopyable(), "Ty must be trivially copyable type."); + add(&_data, sizeof(Ty) ); } @@ -142,7 +148,7 @@ namespace bx template inline uint32_t hash(const Ty& _data) { - static_assert(isTriviallyCopyable() ); + static_assert(isTriviallyCopyable(), "Ty must be trivially copyable type."); return hash(&_data, sizeof(Ty) ); }