mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +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
Notes:
sideshowbarker
2024-07-17 19:05:21 +09:00
Author: https://github.com/ldm5180
Commit: c6acf64558
Pull-request: https://github.com/SerenityOS/serenity/pull/12393
11 changed files with 26 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -395,7 +396,7 @@ static bool validate_table(const Structures::SDTHeader& v_header, size_t length)
|
|||
// https://uefi.org/specs/ACPI/6.4/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html#finding-the-rsdp-on-ia-pc-systems
|
||||
UNMAP_AFTER_INIT Optional<PhysicalAddress> StaticParsing::find_rsdp()
|
||||
{
|
||||
static constexpr auto signature = "RSD PTR "sv;
|
||||
constexpr auto signature = "RSD PTR "sv;
|
||||
auto ebda_or_error = map_ebda();
|
||||
if (!ebda_or_error.is_error()) {
|
||||
auto rsdp = ebda_or_error.value().find_chunk_starting_with(signature, 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue