mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add LogStream operator<< for IPv4Address.
This commit is contained in:
parent
b6dcb5e7ae
commit
d8f1a7e046
Notes:
sideshowbarker
2024-07-19 13:22:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/d8f1a7e046d
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/NetworkOrdered.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()); }
|
||||
};
|
||||
|
||||
inline const LogStream& operator<<(const LogStream& stream, const IPv4Address& value)
|
||||
{
|
||||
return stream << value.to_string();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using AK::IPv4Address;
|
||||
|
|
Loading…
Reference in a new issue