diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-11 00:55:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-11 01:27:46 +0100 |
commit | 8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (patch) | |
tree | ca64ba25aa735d25013d76c6d83570496c742014 /Userland/Applications/Help | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Applications/Help')
-rw-r--r-- | Userland/Applications/Help/History.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Help/History.h | 2 | ||||
-rw-r--r-- | Userland/Applications/Help/ManualModel.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Help/ManualModel.h | 2 | ||||
-rw-r--r-- | Userland/Applications/Help/ManualPageNode.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/Help/History.cpp b/Userland/Applications/Help/History.cpp index d3354255d2..fea165421c 100644 --- a/Userland/Applications/Help/History.cpp +++ b/Userland/Applications/Help/History.cpp @@ -6,7 +6,7 @@ #include "History.h" -void History::push(const StringView& history_item) +void History::push(StringView history_item) { if (!m_items.is_empty() && m_items[m_current_history_item] == history_item) return; diff --git a/Userland/Applications/Help/History.h b/Userland/Applications/Help/History.h index 0125d9c6bf..3ec3d7da1b 100644 --- a/Userland/Applications/Help/History.h +++ b/Userland/Applications/Help/History.h @@ -11,7 +11,7 @@ class History final { public: - void push(const StringView& history_item); + void push(StringView history_item); String current(); void go_back(); diff --git a/Userland/Applications/Help/ManualModel.cpp b/Userland/Applications/Help/ManualModel.cpp index 8461788b56..2fd7324df6 100644 --- a/Userland/Applications/Help/ManualModel.cpp +++ b/Userland/Applications/Help/ManualModel.cpp @@ -31,7 +31,7 @@ ManualModel::ManualModel() m_page_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-unknown.png").release_value_but_fixme_should_propagate_errors()); } -Optional<GUI::ModelIndex> ManualModel::index_from_path(const StringView& path) const +Optional<GUI::ModelIndex> ManualModel::index_from_path(StringView path) const { for (int section = 0; section < row_count(); ++section) { auto parent_index = index(section, 0); diff --git a/Userland/Applications/Help/ManualModel.h b/Userland/Applications/Help/ManualModel.h index 1345fb0548..f9a28110dc 100644 --- a/Userland/Applications/Help/ManualModel.h +++ b/Userland/Applications/Help/ManualModel.h @@ -21,7 +21,7 @@ public: virtual ~ManualModel() override {}; - Optional<GUI::ModelIndex> index_from_path(const StringView&) const; + Optional<GUI::ModelIndex> index_from_path(StringView) const; String page_path(const GUI::ModelIndex&) const; String page_and_section(const GUI::ModelIndex&) const; diff --git a/Userland/Applications/Help/ManualPageNode.h b/Userland/Applications/Help/ManualPageNode.h index c73ee917ae..8e366eae42 100644 --- a/Userland/Applications/Help/ManualPageNode.h +++ b/Userland/Applications/Help/ManualPageNode.h @@ -14,7 +14,7 @@ class ManualPageNode : public ManualNode { public: virtual ~ManualPageNode() override { } - ManualPageNode(const ManualSectionNode& section, const StringView& page) + ManualPageNode(const ManualSectionNode& section, StringView page) : m_section(section) , m_page(page) { |