summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextDocument.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-11 00:55:02 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-11 01:27:46 +0100
commit8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (patch)
treeca64ba25aa735d25013d76c6d83570496c742014 /Userland/Libraries/LibGUI/TextDocument.h
parentad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff)
downloadserenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Libraries/LibGUI/TextDocument.h')
-rw-r--r--Userland/Libraries/LibGUI/TextDocument.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibGUI/TextDocument.h b/Userland/Libraries/LibGUI/TextDocument.h
index 17218725b5..efe7a3e4e0 100644
--- a/Userland/Libraries/LibGUI/TextDocument.h
+++ b/Userland/Libraries/LibGUI/TextDocument.h
@@ -63,7 +63,7 @@ public:
void set_spans(Vector<TextDocumentSpan> spans) { m_spans = move(spans); }
- bool set_text(const StringView&, AllowCallback = AllowCallback::Yes);
+ bool set_text(StringView, AllowCallback = AllowCallback::Yes);
const NonnullOwnPtrVector<TextDocumentLine>& lines() const { return m_lines; }
NonnullOwnPtrVector<TextDocumentLine>& lines() { return m_lines; }
@@ -88,11 +88,11 @@ public:
String text() const;
String text_in_range(const TextRange&) const;
- Vector<TextRange> find_all(const StringView& needle, bool regmatch = false);
+ Vector<TextRange> find_all(StringView needle, bool regmatch = false);
- void update_regex_matches(const StringView&);
- TextRange find_next(const StringView&, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true);
- TextRange find_previous(const StringView&, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true);
+ void update_regex_matches(StringView);
+ TextRange find_next(StringView, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true);
+ TextRange find_previous(StringView, const TextPosition& start = {}, SearchShouldWrap = SearchShouldWrap::Yes, bool regmatch = false, bool match_case = true);
TextPosition next_position_after(const TextPosition&, SearchShouldWrap = SearchShouldWrap::Yes) const;
TextPosition previous_position_before(const TextPosition&, SearchShouldWrap = SearchShouldWrap::Yes) const;
@@ -122,7 +122,7 @@ public:
void set_all_cursors(const TextPosition&);
TextPosition insert_at(const TextPosition&, u32, const Client* = nullptr);
- TextPosition insert_at(const TextPosition&, const StringView&, const Client* = nullptr);
+ TextPosition insert_at(const TextPosition&, StringView, const Client* = nullptr);
void remove(const TextRange&);
virtual bool is_code_document() const { return false; }
@@ -154,14 +154,14 @@ private:
class TextDocumentLine {
public:
explicit TextDocumentLine(TextDocument&);
- explicit TextDocumentLine(TextDocument&, const StringView&);
+ explicit TextDocumentLine(TextDocument&, StringView);
String to_utf8() const;
Utf32View view() const { return { code_points(), length() }; }
const u32* code_points() const { return m_text.data(); }
size_t length() const { return m_text.size(); }
- bool set_text(TextDocument&, const StringView&);
+ bool set_text(TextDocument&, StringView);
void set_text(TextDocument&, Vector<u32>);
void append(TextDocument&, u32);
void prepend(TextDocument&, u32);