mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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:
committed by
Linus Groh
parent
6a4c8a66ae
commit
c6acf64558
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -57,7 +58,7 @@ UNMAP_AFTER_INIT void StorageManagement::enumerate_controllers(bool force_pio, b
|
||||
}
|
||||
|
||||
{
|
||||
static constexpr PCI::HardwareID vmd_device = { 0x8086, 0x9a0b };
|
||||
constexpr PCI::HardwareID vmd_device = { 0x8086, 0x9a0b };
|
||||
if (device_identifier.hardware_id() == vmd_device) {
|
||||
auto controller = PCI::VolumeManagementDevice::must_create(device_identifier);
|
||||
PCI::Access::the().add_host_controller_and_enumerate_attached_devices(move(controller), [this, nvme_poll](PCI::DeviceIdentifier const& device_identifier) -> void {
|
||||
|
||||
Reference in New Issue
Block a user