mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 16:16:43 +00:00
Applications: Change static constexpr variables to constexpr
Function-local `static constexpr` variables can be `constexpr`. This can reduce memory consumption, binary size, and offer additional compiler optimizations.
This commit is contained in:
parent
7012a5eb0b
commit
1dd70a6f49
Notes:
sideshowbarker
2024-07-17 18:09:10 +09:00
Author: https://github.com/ldm5180
Commit: 1dd70a6f49
Pull-request: https://github.com/SerenityOS/serenity/pull/12419
10 changed files with 67 additions and 60 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "TreeMapWidget.h"
|
||||
#include <AK/Array.h>
|
||||
#include <AK/NumberFormat.h>
|
||||
#include <LibGUI/ConnectionToWindowServer.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
|
@ -15,7 +16,7 @@ REGISTER_WIDGET(SpaceAnalyzer, TreeMapWidget)
|
|||
|
||||
namespace SpaceAnalyzer {
|
||||
|
||||
static const Color colors[] = {
|
||||
static constexpr Array colors = {
|
||||
Color(253, 231, 37),
|
||||
Color(148, 216, 64),
|
||||
Color(60, 188, 117),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue