mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:27:34 +00:00
Kernel: Fix common misuse of KString in debug messages
This commit is contained in:
parent
6ccfa3e75e
commit
fa018d3ba1
1 changed files with 8 additions and 0 deletions
|
@ -63,6 +63,14 @@ struct Formatter<OwnPtr<Kernel::KString>> : Formatter<StringView> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct Formatter<NonnullOwnPtr<Kernel::KString>> : Formatter<StringView> {
|
||||||
|
void format(FormatBuilder& builder, NonnullOwnPtr<Kernel::KString> const& value)
|
||||||
|
{
|
||||||
|
Formatter<StringView>::format(builder, value->view());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct Traits<NonnullOwnPtr<Kernel::KString>> : public GenericTraits<NonnullOwnPtr<Kernel::KString>> {
|
struct Traits<NonnullOwnPtr<Kernel::KString>> : public GenericTraits<NonnullOwnPtr<Kernel::KString>> {
|
||||||
using PeekType = Kernel::KString*;
|
using PeekType = Kernel::KString*;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue