Skip to content

Commit

Permalink
AK: Add IPv4Address(NetworkOrdered<dword>) constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Jun 18, 2019
1 parent d9a48b5 commit 203f8e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AK/IPv4Address.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <AK/AKString.h>
#include <AK/NetworkOrdered.h>

namespace AK {

Expand All @@ -22,6 +23,10 @@ class [[gnu::packed]] IPv4Address
m_data[2] = c;
m_data[3] = d;
}
IPv4Address(NetworkOrdered<dword> address)
: m_data_as_dword(address)
{
}

byte operator[](int i) const
{
Expand Down Expand Up @@ -55,4 +60,3 @@ struct Traits<IPv4Address> {
}

using AK::IPv4Address;

0 comments on commit 203f8e5

Please sign in to comment.