mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:17:44 +00:00
Everywhere: Pass AK::StringView by value
This commit is contained in:
parent
ad5d217e76
commit
8b1108e485
392 changed files with 978 additions and 978 deletions
|
@ -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;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
class History final {
|
||||
public:
|
||||
void push(const StringView& history_item);
|
||||
void push(StringView history_item);
|
||||
String current();
|
||||
|
||||
void go_back();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue