mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Fix common misuse of KString in debug messages
This commit is contained in:
parent
6ccfa3e75e
commit
fa018d3ba1
Notes:
sideshowbarker
2024-07-18 01:44:39 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/fa018d3ba12 Pull-request: https://github.com/SerenityOS/serenity/pull/10706
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<>
|
||||
struct Traits<NonnullOwnPtr<Kernel::KString>> : public GenericTraits<NonnullOwnPtr<Kernel::KString>> {
|
||||
using PeekType = Kernel::KString*;
|
||||
|
|
Loading…
Reference in a new issue