diff options
author | Lenny Maiorani <lenny@colorado.edu> | 2021-05-17 16:52:33 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-18 08:07:21 +0200 |
commit | 31d24d829258cf8f52b697dcefff02eae2029bcd (patch) | |
tree | 39240c83d48c240c8778139354f05a492641fdca /Userland/Libraries/LibC | |
parent | 44a9c7c23e223c464d5d4a15c93c9fc7ab8525f0 (diff) | |
download | serenity-31d24d829258cf8f52b697dcefff02eae2029bcd.zip |
LibC: Remove static from function local constexpr variable
Problem:
- Function local `constexpr` variables do not need to be
`static`. This consumes memory which is unnecessary and can prevent
some optimizations.
Solution:
- Remove `static` keyword.
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r-- | Userland/Libraries/LibC/stdlib.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/stdlib.cpp b/Userland/Libraries/LibC/stdlib.cpp index 1e66630927..0406462959 100644 --- a/Userland/Libraries/LibC/stdlib.cpp +++ b/Userland/Libraries/LibC/stdlib.cpp @@ -165,7 +165,7 @@ inline int generate_unique_filename(char* pattern, Callback callback) size_t start = length - 6; - static constexpr char random_characters[] = "abcdefghijklmnopqrstuvwxyz0123456789"; + constexpr char random_characters[] = "abcdefghijklmnopqrstuvwxyz0123456789"; for (int attempt = 0; attempt < 100; ++attempt) { for (int i = 0; i < 6; ++i) |