mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Simplify NetworkOrdered somewhat.
This commit is contained in:
@@ -21,27 +21,12 @@ template<typename T>
|
||||
class [[gnu::packed]] NetworkOrdered
|
||||
{
|
||||
public:
|
||||
NetworkOrdered()
|
||||
: m_network_value(0)
|
||||
{
|
||||
}
|
||||
|
||||
NetworkOrdered() {}
|
||||
NetworkOrdered(const T& host_value)
|
||||
: m_network_value(convert_between_host_and_network(host_value))
|
||||
{
|
||||
}
|
||||
|
||||
NetworkOrdered(const NetworkOrdered& other)
|
||||
: m_network_value(other.m_network_value)
|
||||
{
|
||||
}
|
||||
|
||||
NetworkOrdered& operator=(const NetworkOrdered& other)
|
||||
{
|
||||
m_network_value = other.m_network_value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator T() const { return convert_between_host_and_network(m_network_value); }
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user