1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:27:36 +00:00

Everywhere: Pass AK::StringView by value

This commit is contained in:
Andreas Kling 2021-11-11 00:55:02 +01:00
parent ad5d217e76
commit 8b1108e485
392 changed files with 978 additions and 978 deletions

View file

@ -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;