mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 09:37:45 +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
|
@ -106,7 +106,7 @@ enum class DHCPMessageType : u8 {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct AK::Traits<DHCPOption> : public GenericTraits<DHCPOption> {
|
||||
struct AK::Traits<DHCPOption> : public DefaultTraits<DHCPOption> {
|
||||
static constexpr bool is_trivial() { return true; }
|
||||
static unsigned hash(DHCPOption u) { return int_hash((u8)u); }
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@ private:
|
|||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Traits<DeviceMapper::RegisteredDeviceNode> : public GenericTraits<DeviceMapper::RegisteredDeviceNode> {
|
||||
struct Traits<DeviceMapper::RegisteredDeviceNode> : public DefaultTraits<DeviceMapper::RegisteredDeviceNode> {
|
||||
static unsigned hash(DeviceMapper::RegisteredDeviceNode const& node)
|
||||
{
|
||||
return int_hash(node.minor_number().value());
|
||||
|
|
|
@ -111,7 +111,7 @@ struct ConnectionKey {
|
|||
};
|
||||
|
||||
template<>
|
||||
struct AK::Traits<RequestServer::ConnectionCache::ConnectionKey> : public AK::GenericTraits<RequestServer::ConnectionCache::ConnectionKey> {
|
||||
struct AK::Traits<RequestServer::ConnectionCache::ConnectionKey> : public AK::DefaultTraits<RequestServer::ConnectionCache::ConnectionKey> {
|
||||
static u32 hash(RequestServer::ConnectionCache::ConnectionKey const& key)
|
||||
{
|
||||
return pair_int_hash(pair_int_hash(key.proxy_data.host_ipv4, key.proxy_data.port), pair_int_hash(key.hostname.hash(), key.port));
|
||||
|
|
|
@ -39,6 +39,6 @@ private:
|
|||
}
|
||||
|
||||
template<>
|
||||
struct AK::Traits<SpiceAgent::ChunkHeader> : public AK::GenericTraits<SpiceAgent::ChunkHeader> {
|
||||
struct AK::Traits<SpiceAgent::ChunkHeader> : public AK::DefaultTraits<SpiceAgent::ChunkHeader> {
|
||||
static constexpr bool is_trivially_serializable() { return true; }
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ private:
|
|||
}
|
||||
|
||||
template<>
|
||||
struct AK::Traits<SpiceAgent::MessageHeader> : public AK::GenericTraits<SpiceAgent::MessageHeader> {
|
||||
struct AK::Traits<SpiceAgent::MessageHeader> : public AK::DefaultTraits<SpiceAgent::MessageHeader> {
|
||||
static constexpr bool is_trivially_serializable() { return true; }
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ private:
|
|||
|
||||
namespace AK {
|
||||
template<>
|
||||
struct Traits<WindowIdentifier> : public GenericTraits<WindowIdentifier> {
|
||||
struct Traits<WindowIdentifier> : public DefaultTraits<WindowIdentifier> {
|
||||
static unsigned hash(WindowIdentifier const& w) { return pair_int_hash(w.client_id(), w.window_id()); }
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue