1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00
serenity/Userland/Applications/HexEditor
Lenny Maiorani 800ea8ea96 Userland: static vs non-static constexpr variables
Problem:
- `static` variables consume memory and sometimes are less
  optimizable.
- `static const` variables can be `constexpr`, usually.
- `static` function-local variables require an initialization check
  every time the function is run.

Solution:
- If a global `static` variable is only used in a single function then
  move it into the function and make it non-`static` and `constexpr`.
- Make all global `static` variables `constexpr` instead of `const`.
- Change function-local `static const[expr]` variables to be just
  `constexpr`.
2021-05-21 10:07:06 +01:00
..
CMakeLists.txt Base: Update some icons for color, quality and consistency 2021-02-25 08:08:26 +01:00
FindDialog.cpp Userland: static vs non-static constexpr variables 2021-05-21 10:07:06 +01:00
FindDialog.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
HexEditor.cpp LibGfx: Remove Gfx::FontDatabase::default_bold_font() 2021-05-20 20:55:29 +02:00
HexEditor.h LibGUI: Rename ScrollableWidget => AbstractScrollableWidget 2021-05-03 21:03:13 +02:00
HexEditorWidget.cpp AK+Userland: Remove nullability feature for the ByteBuffer type 2021-05-16 17:49:42 +02:00
HexEditorWidget.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
main.cpp Userland: Tighten a *lot* of pledges! :^) 2021-05-13 23:28:40 +02:00