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/Libraries/LibLine/Editor.h | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'Userland/Libraries/LibLine/Editor.h')
-rw-r--r-- | Userland/Libraries/LibLine/Editor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibLine/Editor.h b/Userland/Libraries/LibLine/Editor.h index c4aa22fab7..ee7e237722 100644 --- a/Userland/Libraries/LibLine/Editor.h +++ b/Userland/Libraries/LibLine/Editor.h @@ -90,7 +90,7 @@ struct Configuration { enable_bracketed_paste = flags & Flags::BracketedPaste; } - static Configuration from_config(const StringView& libname = "line"); + static Configuration from_config(StringView libname = "line"); RefreshBehavior refresh_behavior { RefreshBehavior::Lazy }; SignalHandler m_signal_mode { SignalHandler::WithSignalHandlers }; @@ -159,14 +159,14 @@ public: void register_key_input_callback(Vector<Key> keys, Function<bool(Editor&)> callback) { m_callback_machine.register_key_input_callback(move(keys), move(callback)); } void register_key_input_callback(Key key, Function<bool(Editor&)> callback) { register_key_input_callback(Vector<Key> { key }, move(callback)); } - static StringMetrics actual_rendered_string_metrics(const StringView&); + static StringMetrics actual_rendered_string_metrics(StringView); static StringMetrics actual_rendered_string_metrics(const Utf32View&); Function<Vector<CompletionSuggestion>(const Editor&)> on_tab_complete; Function<void()> on_interrupt_handled; Function<void(Editor&)> on_display_refresh; - static Function<bool(Editor&)> find_internal_function(const StringView& name); + static Function<bool(Editor&)> find_internal_function(StringView name); enum class CaseChangeOp { Lowercase, Uppercase, @@ -207,7 +207,7 @@ public: void clear_line(); void insert(const String&); - void insert(const StringView&); + void insert(StringView); void insert(const Utf32View&); void insert(const u32); void stylize(const Span&, const Style&); @@ -282,7 +282,7 @@ private: Style find_applicable_style(size_t offset) const; - bool search(const StringView&, bool allow_empty = false, bool from_beginning = true); + bool search(StringView, bool allow_empty = false, bool from_beginning = true); inline void end_search() { m_is_searching = false; |