Index: tools/gn/function_get_path_info.cc |
diff --git a/tools/gn/function_get_path_info.cc b/tools/gn/function_get_path_info.cc |
index ea6651c2f0219bed5b1cc1725a13e720eba7af68..67f934427c91a025e16d1dd0f7be620670761916 100644 |
--- a/tools/gn/function_get_path_info.cc |
+++ b/tools/gn/function_get_path_info.cc |
@@ -222,10 +222,9 @@ Value RunGetPathInfo(Scope* scope, |
} else if (args[0].type() == Value::LIST) { |
const std::vector<Value>& input_list = args[0].list_value(); |
Value result(function, Value::LIST); |
- for (size_t i = 0; i < input_list.size(); i++) { |
+ for (const auto& cur : input_list) { |
result.list_value().push_back(Value(function, |
- GetOnePathInfo(scope->settings(), current_dir, what, |
- input_list[i], err))); |
+ GetOnePathInfo(scope->settings(), current_dir, what, cur, err))); |
if (err->has_error()) |
return Value(); |
} |