diff options
author | Linus Groh <mail@linusgroh.de> | 2021-05-29 01:14:04 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-29 01:14:04 +0100 |
commit | 94a56c3aee47cabcd044ae4180f3befbe4a16dee (patch) | |
tree | 003c8a8d4713dbbf4cddfd6ac88a2ffae9fb7a2e /Userland/Applications/Browser | |
parent | 507c5b6248c12cbdc116f6479a449116e4ae0cd8 (diff) | |
download | serenity-94a56c3aee47cabcd044ae4180f3befbe4a16dee.zip |
Browser: Pass Tab::on_title_change title argument as const reference
Diffstat (limited to 'Userland/Applications/Browser')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Browser/Tab.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 9cd424a9f5..d1dbcc7f7f 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -477,7 +477,7 @@ void BrowserWindow::create_new_tab(URL url, bool activate) VERIFY(default_favicon); m_tab_widget->set_tab_icon(new_tab, default_favicon); - new_tab.on_title_change = [this, &new_tab](auto title) { + new_tab.on_title_change = [this, &new_tab](auto& title) { m_tab_widget->set_tab_title(new_tab, title); if (m_tab_widget->active_widget() == &new_tab) set_window_title_for_tab(new_tab); diff --git a/Userland/Applications/Browser/Tab.h b/Userland/Applications/Browser/Tab.h index 7bfd10d60e..9aeb2c4ce2 100644 --- a/Userland/Applications/Browser/Tab.h +++ b/Userland/Applications/Browser/Tab.h @@ -55,7 +55,7 @@ public: void action_entered(GUI::Action&); void action_left(GUI::Action&); - Function<void(String)> on_title_change; + Function<void(const String&)> on_title_change; Function<void(const URL&)> on_tab_open_request; Function<void(Tab&)> on_tab_close_request; Function<void(const Gfx::Bitmap&)> on_favicon_change; |