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/Graphics/VirtIOGPU | |
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/Graphics/VirtIOGPU')
-rw-r--r-- | Kernel/Graphics/VirtIOGPU/FramebufferDevice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Graphics/VirtIOGPU/FramebufferDevice.cpp b/Kernel/Graphics/VirtIOGPU/FramebufferDevice.cpp index 52160312d4..f14d1be6ea 100644 --- a/Kernel/Graphics/VirtIOGPU/FramebufferDevice.cpp +++ b/Kernel/Graphics/VirtIOGPU/FramebufferDevice.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2021, Sahan Fernando <sahan.h.fernando@gmail.com> + * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ @@ -342,7 +343,7 @@ void FramebufferDevice::clear_to_black(Buffer& buffer) void FramebufferDevice::draw_ntsc_test_pattern(Buffer& buffer) { - static constexpr u8 colors[12][4] = { + constexpr u8 colors[12][4] = { { 0xff, 0xff, 0xff, 0xff }, // White { 0x00, 0xff, 0xff, 0xff }, // Primary + Composite colors { 0xff, 0xff, 0x00, 0xff }, |