1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +00:00

AK: Rename GenericTraits to DefaultTraits

This feels like a more fitting name for something that provides the
default values for Traits.
This commit is contained in:
Tim Schumacher 2023-11-08 20:29:12 +01:00 committed by Tim Flynn
parent ac23ab42b3
commit a2f60911fe
101 changed files with 154 additions and 154 deletions

View file

@ -215,7 +215,7 @@ inline bool operator==(NonnullGCPtr<T> const& a, GCPtr<U> const& b)
namespace AK {
template<typename T>
struct Traits<JS::GCPtr<T>> : public GenericTraits<JS::GCPtr<T>> {
struct Traits<JS::GCPtr<T>> : public DefaultTraits<JS::GCPtr<T>> {
static unsigned hash(JS::GCPtr<T> const& value)
{
return Traits<T*>::hash(value.ptr());
@ -223,7 +223,7 @@ struct Traits<JS::GCPtr<T>> : public GenericTraits<JS::GCPtr<T>> {
};
template<typename T>
struct Traits<JS::NonnullGCPtr<T>> : public GenericTraits<JS::NonnullGCPtr<T>> {
struct Traits<JS::NonnullGCPtr<T>> : public DefaultTraits<JS::NonnullGCPtr<T>> {
static unsigned hash(JS::NonnullGCPtr<T> const& value)
{
return Traits<T*>::hash(value.ptr());

View file

@ -195,12 +195,12 @@ inline Handle<Value> make_handle(Value value, SourceLocation location = SourceLo
namespace AK {
template<typename T>
struct Traits<JS::Handle<T>> : public GenericTraits<JS::Handle<T>> {
struct Traits<JS::Handle<T>> : public DefaultTraits<JS::Handle<T>> {
static unsigned hash(JS::Handle<T> const& handle) { return Traits<T>::hash(handle); }
};
template<>
struct Traits<JS::Handle<JS::Value>> : public GenericTraits<JS::Handle<JS::Value>> {
struct Traits<JS::Handle<JS::Value>> : public DefaultTraits<JS::Handle<JS::Value>> {
static unsigned hash(JS::Handle<JS::Value> const& handle) { return Traits<JS::Value>::hash(handle.value()); }
};