mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:57:44 +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:
parent
ac23ab42b3
commit
a2f60911fe
101 changed files with 154 additions and 154 deletions
|
@ -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());
|
||||
|
|
|
@ -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()); }
|
||||
};
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ private:
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<JS::PropertyKey> : public GenericTraits<JS::PropertyKey> {
|
||||
struct Traits<JS::PropertyKey> : public DefaultTraits<JS::PropertyKey> {
|
||||
static unsigned hash(JS::PropertyKey const& name)
|
||||
{
|
||||
VERIFY(name.is_valid());
|
||||
|
|
|
@ -119,7 +119,7 @@ private:
|
|||
}
|
||||
|
||||
template<>
|
||||
struct AK::Traits<JS::TransitionKey> : public GenericTraits<JS::TransitionKey> {
|
||||
struct AK::Traits<JS::TransitionKey> : public DefaultTraits<JS::TransitionKey> {
|
||||
static unsigned hash(const JS::TransitionKey& key)
|
||||
{
|
||||
return pair_int_hash(key.attributes.bits(), Traits<JS::StringOrSymbol>::hash(key.property_key));
|
||||
|
|
|
@ -154,7 +154,7 @@ private:
|
|||
}
|
||||
|
||||
template<>
|
||||
struct AK::Traits<JS::StringOrSymbol> : public GenericTraits<JS::StringOrSymbol> {
|
||||
struct AK::Traits<JS::StringOrSymbol> : public DefaultTraits<JS::StringOrSymbol> {
|
||||
static unsigned hash(JS::StringOrSymbol const& key)
|
||||
{
|
||||
return key.hash();
|
||||
|
|
|
@ -706,7 +706,7 @@ struct Formatter<JS::Value> : Formatter<StringView> {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct Traits<JS::Value> : GenericTraits<JS::Value> {
|
||||
struct Traits<JS::Value> : DefaultTraits<JS::Value> {
|
||||
static unsigned hash(JS::Value value) { return Traits<u64>::hash(value.encoded()); }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue