From 553a7a92781756c0fdd1814d372fd132c9fba628 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 21 Oct 2025 15:46:13 +0200 Subject: [PATCH] AK: Remove unused and unintuitive Trait for char* We don't use char* in containers, and the expectation would be a pointer compare instead of a string compare; so remove this specialisation entirely. --- AK/Traits.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/AK/Traits.h b/AK/Traits.h index 31053f6bcd2..2d4a95e6865 100644 --- a/AK/Traits.h +++ b/AK/Traits.h @@ -83,15 +83,6 @@ struct Traits : public DefaultTraits { static constexpr bool is_trivially_serializable() { return Traits>::is_trivially_serializable(); } }; -template -requires(Detail::IsPointerOfType) struct Traits : public DefaultTraits { - static unsigned hash(T const value) { return string_hash(value, strlen(value)); } - static constexpr bool equals(T const a, T const b) { return strcmp(a, b); } - static constexpr bool is_trivial() { return true; } - // NOTE: Trivial types always have fast equality checks. - static constexpr bool may_have_slow_equality_check() { return false; } -}; - } #if USING_AK_GLOBALLY