1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:27:35 +00:00

AK+Format: Use pointer mode for pointers by default.

This commit is contained in:
asynts 2020-10-07 12:47:35 +02:00 committed by Andreas Kling
parent b9316474b7
commit b94cb02a7f
2 changed files with 5 additions and 0 deletions

View file

@ -284,6 +284,9 @@ template<typename T>
struct Formatter<T*> : StandardFormatter {
void format(TypeErasedFormatParams& params, FormatBuilder& builder, T* value)
{
if (m_mode == Mode::Default)
m_mode = Mode::Pointer;
Formatter<FlatPtr> formatter { *this };
formatter.format(params, builder, reinterpret_cast<FlatPtr>(value));
}