mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:44:58 +00:00
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.
This commit is contained in:
parent
44a9c7c23e
commit
31d24d8292
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@ static char* generate_random_filename(const char* pattern)
|
|||
char* new_filename = strdup(pattern);
|
||||
int pattern_length = strlen(pattern);
|
||||
|
||||
static constexpr char random_characters[] = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
constexpr char random_characters[] = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
for (auto i = pattern_length - 1; i >= 0; --i) {
|
||||
if (pattern[i] != 'X')
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue