mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
AK: Add Formatter<FormatString> as helper class.
This commit is contained in:
parent
9a842ec419
commit
1160817a9e
13 changed files with 64 additions and 94 deletions
|
@ -76,11 +76,10 @@ inline const LogStream& operator<<(const LogStream& stream, VirtualAddress value
|
|||
return stream << 'V' << value.as_ptr();
|
||||
}
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Formatter<VirtualAddress> : Formatter<StringView> {
|
||||
void format(FormatBuilder&, const VirtualAddress&);
|
||||
struct AK::Formatter<VirtualAddress> : AK::Formatter<FormatString> {
|
||||
void format(FormatBuilder& builder, const VirtualAddress& value)
|
||||
{
|
||||
return AK::Formatter<FormatString>::format(builder, "V{}", value.as_ptr());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue