diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-11 21:12:12 +0200 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2022-01-12 16:09:09 +0200 |
commit | 194d1c884b234927ebf2ffec01051cad342dbef2 (patch) | |
tree | 0932f3fb8b0030b95bc3dcb4a26e46271e8f227b /Kernel/CommandLine.h | |
parent | a4560313ebe1cd328b98d9cc76c6eb3147aef1b4 (diff) | |
download | serenity-194d1c884b234927ebf2ffec01051cad342dbef2.zip |
Kernel: Convert CommandLine to KString
Diffstat (limited to 'Kernel/CommandLine.h')
-rw-r--r-- | Kernel/CommandLine.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<StringView> 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<StringView>& args); - void build_commandline(const String& cmdline_from_bootloader); + static NonnullOwnPtr<KString> build_commandline(StringView cmdline_from_bootloader); - String m_string; + NonnullOwnPtr<KString> m_string; HashMap<StringView, StringView> m_params; }; |