summaryrefslogtreecommitdiff
path: root/Kernel/Net/Routing.cpp
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@colorado.edu>2021-05-19 08:35:09 -0600
committerLinus Groh <mail@linusgroh.de>2021-05-19 21:21:47 +0100
commit57513271956942bbe51b39afeb4bb445aaff21fb (patch)
tree38fb1fc2a13b8f8d7538a214195bee6936d2da24 /Kernel/Net/Routing.cpp
parent2b64d163cd9f25bd2951bf8721ef9325decb1b72 (diff)
downloadserenity-57513271956942bbe51b39afeb4bb445aaff21fb.zip
Kernel: 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`.
Diffstat (limited to 'Kernel/Net/Routing.cpp')
0 files changed, 0 insertions, 0 deletions