Take StringView in more places

We should work towards a pattern where we take StringView as function
arguments, and store String as member, to push the String construction
to the last possible moment.
This commit is contained in:
Robin Burchell 2019-06-02 12:26:28 +02:00 committed by Andreas Kling
commit 7bce096afd
Notes: sideshowbarker 2024-07-19 13:46:26 +09:00
14 changed files with 28 additions and 36 deletions

View file

@ -199,8 +199,8 @@ int main(int argc, char** argv)
go_back_action->set_enabled(directory_view->path_history_position() > 0);
};
directory_view->on_status_message = [statusbar] (String message) {
statusbar->set_text(move(message));
directory_view->on_status_message = [statusbar] (const StringView& message) {
statusbar->set_text(message);
};
directory_view->on_thumbnail_progress = [&] (int done, int total) {