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/Spreadsheet/Spreadsheet.h | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Applications/Spreadsheet/Spreadsheet.h')
-rw-r--r-- | Userland/Applications/Spreadsheet/Spreadsheet.h | 16 |
1 files changed, 8 insertions, 8 deletions
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<Position> parse_cell_name(const StringView&) const; - Optional<size_t> column_index(const StringView& column_name) const; - Optional<String> column_arithmetic(const StringView& column_name, int offset); + Optional<Position> parse_cell_name(StringView) const; + Optional<size_t> column_index(StringView column_name) const; + Optional<String> column_arithmetic(StringView column_name, int offset); Cell* from_url(const URL&); const Cell* from_url(const URL& url) const { return const_cast<Sheet*>(this)->from_url(url); } @@ -50,7 +50,7 @@ public: static RefPtr<Sheet> 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<Sheet*>(this)->at(position); } - const Cell* at(const StringView& name) const { return const_cast<Sheet*>(this)->at(name); } - Cell* at(const StringView&); + const Cell* at(StringView name) const { return const_cast<Sheet*>(this)->at(name); } + Cell* at(StringView); const Cell& ensure(const Position& position) const { return const_cast<Sheet*>(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<String> m_columns; |