From 194d1c884b234927ebf2ffec01051cad342dbef2 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Tue, 11 Jan 2022 21:12:12 +0200 Subject: Kernel: Convert CommandLine to KString --- Kernel/CommandLine.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Kernel/CommandLine.h') diff --git a/Kernel/CommandLine.h b/Kernel/CommandLine.h index a7f9b85840..ca67ae7b4d 100644 --- a/Kernel/CommandLine.h +++ b/Kernel/CommandLine.h @@ -58,7 +58,7 @@ public: BootloaderOnly }; - [[nodiscard]] const String& string() const { return m_string; } + [[nodiscard]] StringView string() const { return m_string->view(); } Optional lookup(StringView key) const; [[nodiscard]] bool contains(StringView key) const; @@ -89,12 +89,12 @@ public: [[nodiscard]] size_t switch_to_tty() const; private: - CommandLine(const String&); + CommandLine(StringView); void add_arguments(const Vector& args); - void build_commandline(const String& cmdline_from_bootloader); + static NonnullOwnPtr build_commandline(StringView cmdline_from_bootloader); - String m_string; + NonnullOwnPtr m_string; HashMap m_params; }; -- cgit v1.2.3