mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:07:44 +00:00
AK: Add formatter for pointer types.
This commit is contained in:
parent
ebafc5b4d2
commit
fb7a94c959
3 changed files with 41 additions and 1 deletions
|
@ -198,6 +198,15 @@ struct Formatter<T, typename EnableIf<IsIntegral<T>::value>::Type> : StandardFor
|
|||
void format(StringBuilder&, T value, FormatterContext&);
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct Formatter<T*> : StandardFormatter {
|
||||
void format(StringBuilder& builder, T* value, FormatterContext& context)
|
||||
{
|
||||
Formatter<FlatPtr> formatter { *this };
|
||||
formatter.format(builder, reinterpret_cast<FlatPtr>(value), context);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Formatter<bool> : StandardFormatter {
|
||||
void format(StringBuilder&, bool value, FormatterContext&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue