mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
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. Fixes #26267. (cherry picked from commit 09c9321a560e0f7070b046f74f9283313d5aaa4e)
This commit is contained in:
1 parent
90fe3c9a36
commit
594d9f6bd3
1 file changed
-7
@@ -75,13 +75,6 @@ struct Traits<T> : public DefaultTraits<T> {
|
||||
static constexpr bool is_trivially_serializable() { return Traits<UnderlyingType<T>>::is_trivially_serializable(); }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
requires(Detail::IsPointerOfType<char, T>) struct Traits<T> : public DefaultTraits<T> {
|
||||
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; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#if USING_AK_GLOBALLY
|
||||
|
||||
Reference in new issue
Block a user