diff options
author | Lenny Maiorani <lenny@serenityos.org> | 2022-02-09 11:33:39 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-02-09 21:04:51 +0000 |
commit | c6acf645589cd96b9e25ab9f9da41ca2ae3721b4 (patch) | |
tree | ce5da59df32cbb23787d4ea11f9742e695cb73c3 /Kernel/Prekernel | |
parent | 6a4c8a66aeba4b6ed0a91f2f0e9b7da42fe2b06f (diff) | |
download | serenity-c6acf645589cd96b9e25ab9f9da41ca2ae3721b4.zip |
Kernel: Change static constexpr variables to constexpr where possible
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
These changes result in a stripped x86_64 kernel binary size reduction
of 592 bytes.
Diffstat (limited to 'Kernel/Prekernel')
-rw-r--r-- | Kernel/Prekernel/Arch/aarch64/init.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Prekernel/Arch/aarch64/init.cpp b/Kernel/Prekernel/Arch/aarch64/init.cpp index 8c6f6a2add..04d2fb4115 100644 --- a/Kernel/Prekernel/Arch/aarch64/init.cpp +++ b/Kernel/Prekernel/Arch/aarch64/init.cpp @@ -2,6 +2,7 @@ * Copyright (c) 2021, Nico Weber <thakis@chromium.org> * Copyright (c) 2021, Marcin Undak <mcinek@gmail.com> * Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -99,7 +100,7 @@ void __stack_chk_fail() extern "C" void exception_common(TrapFrame const* const trap_frame) { - static constexpr bool print_stack_frame = true; + constexpr bool print_stack_frame = true; if constexpr (print_stack_frame) { auto& uart = Prekernel::UART::the(); |