diff options
author | MacDue <macdue@dueutil.tech> | 2022-11-19 01:09:53 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-11-19 14:37:31 +0000 |
commit | 8a5d2be617a82c93cfafa6c714dff67ab5ff0f7b (patch) | |
tree | 4245758b39618f88b850581e8c9519c3077559fe /Userland/Applications/Terminal | |
parent | 66a428ae03e12e5990feb209533f99516e41ed78 (diff) | |
download | serenity-8a5d2be617a82c93cfafa6c714dff67ab5ff0f7b.zip |
Everywhere: Remove unnecessary mutable attributes from lambdas
These lambdas were marked mutable as they captured a Ptr wrapper
class by value, which then only returned const-qualified references
to the value they point from the previous const pointer operators.
Nothing is actually mutating in the lambdas state here, and now
that the Ptr operators don't add extra const qualifiers these
can be removed.
Diffstat (limited to 'Userland/Applications/Terminal')
-rw-r--r-- | Userland/Applications/Terminal/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 4fbf80a25f..44db0407d5 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -199,18 +199,18 @@ static ErrorOr<NonnullRefPtr<GUI::Window>> create_find_window(VT::TerminalWidget find_forwards->set_fixed_width(25); find_forwards->set_icon(TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/downward-triangle.png"sv))); - find_textbox->on_return_pressed = [find_backwards]() mutable { + find_textbox->on_return_pressed = [find_backwards] { find_backwards->click(); }; - find_textbox->on_shift_return_pressed = [find_forwards]() mutable { + find_textbox->on_shift_return_pressed = [find_forwards] { find_forwards->click(); }; auto match_case = TRY(main_widget->try_add<GUI::CheckBox>("Case sensitive")); auto wrap_around = TRY(main_widget->try_add<GUI::CheckBox>("Wrap around")); - find_backwards->on_click = [&terminal, find_textbox, match_case, wrap_around](auto) mutable { + find_backwards->on_click = [&terminal, find_textbox, match_case, wrap_around](auto) { auto needle = find_textbox->text(); if (needle.is_empty()) { return; |