1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

Applications: Change static constexpr variables to constexpr

Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
This commit is contained in:
Lenny Maiorani 2022-02-09 17:45:15 -07:00 committed by Andreas Kling
parent 7012a5eb0b
commit 1dd70a6f49
10 changed files with 67 additions and 60 deletions

View file

@ -2,6 +2,7 @@
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -322,7 +323,7 @@ bool add_launch_handler_actions_to_menu(RefPtr<GUI::Menu>& menu, DirectoryView c
ErrorOr<int> run_in_desktop_mode()
{
static constexpr char const* process_name = "FileManager (Desktop)";
constexpr char const* process_name = "FileManager (Desktop)";
set_process_name(process_name, strlen(process_name));
pthread_setname_np(pthread_self(), process_name);