Index: tools/gn/xcode_writer.cc |
diff --git a/tools/gn/xcode_writer.cc b/tools/gn/xcode_writer.cc |
index 6e5042865aa1dc746382e68c191f76d33edb9dd1..b6c0bc66679f17e403168d56bdc33ad3c2246281 100644 |
--- a/tools/gn/xcode_writer.cc |
+++ b/tools/gn/xcode_writer.cc |
@@ -36,10 +36,15 @@ struct SafeEnvironmentVariableInfo { |
bool capture_at_generation; |
}; |
+// clang-format off |
SafeEnvironmentVariableInfo kSafeEnvironmentVariables[] = { |
- {"HOME", true}, {"LANG", true}, {"PATH", true}, |
- {"USER", true}, {"TMPDIR", false}, |
+ {"HOME", true}, |
+ {"LANG", true}, |
+ {"PATH", true}, |
+ {"USER", true}, |
+ {"TMPDIR", false}, |
}; |
+// clang-format on |
XcodeWriter::TargetOsType GetTargetOs(const Args& args) { |
const Value* target_os_value = args.GetArgOverride(variables::kTargetOs); |
@@ -63,8 +68,7 @@ std::string GetBuildScript(const std::string& target_name, |
// variable overridding settings, including the SDK, thus breaking hermetic |
// build). |
script << "env -i "; |
- for (size_t i = 0; i < arraysize(kSafeEnvironmentVariables); ++i) { |
- const auto& variable = kSafeEnvironmentVariables[i]; |
+ for (const auto& variable : kSafeEnvironmentVariables) { |
script << variable.name << "=\""; |
std::string value; |