mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 01:32:14 -05:00
AK: Add IPv4Address(NetworkOrdered<dword>) constructor.
This commit is contained in:
parent
d9a48b5916
commit
203f8e5320
Notes:
sideshowbarker
2024-07-19 13:33:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/203f8e5320b
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/NetworkOrdered.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -22,6 +23,10 @@ public:
|
|||
m_data[2] = c;
|
||||
m_data[3] = d;
|
||||
}
|
||||
IPv4Address(NetworkOrdered<dword> address)
|
||||
: m_data_as_dword(address)
|
||||
{
|
||||
}
|
||||
|
||||
byte operator[](int i) const
|
||||
{
|
||||
|
@ -55,4 +60,3 @@ struct Traits<IPv4Address> {
|
|||
}
|
||||
|
||||
using AK::IPv4Address;
|
||||
|
||||
|
|
Loading…
Reference in a new issue