From 8b1108e4858f797c9216dc8ae4a3918ad50c73b4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 11 Nov 2021 00:55:02 +0100 Subject: Everywhere: Pass AK::StringView by value --- Userland/Applications/Spreadsheet/Spreadsheet.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Userland/Applications/Spreadsheet/Spreadsheet.h') diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.h b/Userland/Applications/Spreadsheet/Spreadsheet.h index 9637e08bb0..e3f0f24e95 100644 --- a/Userland/Applications/Spreadsheet/Spreadsheet.h +++ b/Userland/Applications/Spreadsheet/Spreadsheet.h @@ -31,9 +31,9 @@ public: ~Sheet(); - Optional parse_cell_name(const StringView&) const; - Optional column_index(const StringView& column_name) const; - Optional column_arithmetic(const StringView& column_name, int offset); + Optional parse_cell_name(StringView) const; + Optional column_index(StringView column_name) const; + Optional column_arithmetic(StringView column_name, int offset); Cell* from_url(const URL&); const Cell* from_url(const URL& url) const { return const_cast(this)->from_url(url); } @@ -50,7 +50,7 @@ public: static RefPtr from_xsv(const Reader::XSV&, Workbook&); const String& name() const { return m_name; } - void set_name(const StringView& name) { m_name = name; } + void set_name(StringView name) { m_name = name; } JsonObject gather_documentation() const; @@ -62,8 +62,8 @@ public: Cell* at(const Position& position); const Cell* at(const Position& position) const { return const_cast(this)->at(position); } - const Cell* at(const StringView& name) const { return const_cast(this)->at(name); } - Cell* at(const StringView&); + const Cell* at(StringView name) const { return const_cast(this)->at(name); } + Cell* at(StringView); const Cell& ensure(const Position& position) const { return const_cast(this)->ensure(position); } Cell& ensure(const Position& position) @@ -111,7 +111,7 @@ public: JS::Value value; JS::Exception* exception { nullptr }; }; - ValueAndException evaluate(const StringView&, Cell* = nullptr); + ValueAndException evaluate(StringView, Cell* = nullptr); JS::Interpreter& interpreter() const; SheetGlobalObject& global_object() const { return *m_global_object; } @@ -136,7 +136,7 @@ public: private: explicit Sheet(Workbook&); - explicit Sheet(const StringView& name, Workbook&); + explicit Sheet(StringView name, Workbook&); String m_name; Vector m_columns; -- cgit v1.2.3