mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
AK: Add LogStream operator<< for IPv4Address.
This commit is contained in:
parent
b6dcb5e7ae
commit
d8f1a7e046
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/AKString.h>
|
#include <AK/AKString.h>
|
||||||
|
#include <AK/LogStream.h>
|
||||||
#include <AK/NetworkOrdered.h>
|
#include <AK/NetworkOrdered.h>
|
||||||
#include <AK/Optional.h>
|
#include <AK/Optional.h>
|
||||||
|
|
||||||
|
@ -85,6 +86,11 @@ struct Traits<IPv4Address> : public GenericTraits<IPv4Address> {
|
||||||
static void dump(const IPv4Address& address) { kprintf("%s", address.to_string().characters()); }
|
static void dump(const IPv4Address& address) { kprintf("%s", address.to_string().characters()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inline const LogStream& operator<<(const LogStream& stream, const IPv4Address& value)
|
||||||
|
{
|
||||||
|
return stream << value.to_string();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using AK::IPv4Address;
|
using AK::IPv4Address;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue