1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:47:46 +00:00

Libraries: Make CharacterBitmap instances at compile-time

`CharacterBitmap` instances are generated at run-time and put on the
heap, but they can be created in a `constexpr` context and stored in
static memory.

Also, remove additional `width` and `height` `static` values in favor
of using the `constexpr` member functions of `CharacterBitmap`.

These changes also include the removal of some initialization code
which tests if the `CharacterBitmap` is created since it is always
created and removes function-local `static` values which cause
run-time branches to ensure it is initialized each time the function
is called.
This commit is contained in:
Lenny Maiorani 2022-02-28 19:21:12 -07:00 committed by Linus Groh
parent dc518404ce
commit d5fdc6096c
9 changed files with 97 additions and 135 deletions

View file

@ -6,7 +6,6 @@ set(SOURCES
BitmapFont.cpp
BMPLoader.cpp
BMPWriter.cpp
CharacterBitmap.cpp
ClassicStylePainter.cpp
ClassicWindowTheme.cpp
Color.cpp