mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 19:24:57 +00:00
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.
This commit is contained in:
parent
6a4c8a66ae
commit
c6acf64558
11 changed files with 26 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -86,7 +87,7 @@ UNMAP_AFTER_INIT void MultiProcessorParser::parse_configuration_table()
|
|||
|
||||
UNMAP_AFTER_INIT Optional<PhysicalAddress> MultiProcessorParser::find_floating_pointer()
|
||||
{
|
||||
static constexpr auto signature = "_MP_"sv;
|
||||
constexpr auto signature = "_MP_"sv;
|
||||
auto ebda_or_error = map_ebda();
|
||||
if (!ebda_or_error.is_error()) {
|
||||
auto mp_floating_pointer = ebda_or_error.value().find_chunk_starting_with(signature, 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue