Fix format

This commit is contained in:
John Ericson 2024-06-27 20:41:03 -04:00
parent 7312d13acc
commit 874ff000d4
2 changed files with 3 additions and 2 deletions

View file

@ -15,7 +15,7 @@
excludes = [ excludes = [
# We don't want to format test data # We don't want to format test data
# ''tests/(?!nixos/).*\.nix'' # ''tests/(?!nixos/).*\.nix''
''^src/[^/]*-test/[^/]*/data/.*$'' ''^src/[^/]*-test/data/.*$''
# Don't format vendored code # Don't format vendored code
''^doc/manual/redirects\.js$'' ''^doc/manual/redirects\.js$''

View file

@ -13,7 +13,8 @@ static StringSet getAllVariables()
StringSet variables = lowercaseVariables; StringSet variables = lowercaseVariables;
for (const auto & variable : lowercaseVariables) { for (const auto & variable : lowercaseVariables) {
std::string upperVariable; std::string upperVariable;
std::transform(variable.begin(), variable.end(), upperVariable.begin(), [](unsigned char c) { return std::toupper(c); }); std::transform(
variable.begin(), variable.end(), upperVariable.begin(), [](unsigned char c) { return std::toupper(c); });
variables.insert(std::move(upperVariable)); variables.insert(std::move(upperVariable));
} }
return variables; return variables;