Util: Change nullptr stringification

This commit is contained in:
Riyyi
2022-08-03 15:49:43 +02:00
parent 1b7a736be2
commit 5e419f501d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ void Formatter<const char*>::format(Builder& builder, const char* value) const
{
Formatter<std::string_view>::format(
builder,
value != nullptr ? std::string_view { value, strlen(value) } : "(nil)");
value != nullptr ? std::string_view { value, strlen(value) } : "nullptr");
}
// Pointer
+1 -1
View File
@@ -149,7 +149,7 @@ struct Formatter<T*> {
void format(Builder& builder, T* value) const
{
value == nullptr
? builder.putString("0x0")
? builder.putString("nullptr")
: builder.putPointer(static_cast<const void*>(value));
}
};