Chromium Code Reviews| Index: tools/gn/generate_test_gn_data.cc |
| diff --git a/tools/gn/generate_test_gn_data.cc b/tools/gn/generate_test_gn_data.cc |
| index 05197f748d201f742db208151d5dd22883bdc785..a7fb62e3770a878a910a3f3460da00a7a5c2edd6 100644 |
| --- a/tools/gn/generate_test_gn_data.cc |
| +++ b/tools/gn/generate_test_gn_data.cc |
| @@ -30,8 +30,8 @@ std::string FilePathToUTF8(const base::FilePath& path) { |
| base::FilePath RepoPathToPathName(const std::vector<int>& repo_path) { |
| base::FilePath ret; |
| - for (size_t i = 0; i < repo_path.size(); i++) { |
| - ret = ret.Append(UTF8ToFilePath(base::IntToString(repo_path[i]))); |
| + for (auto& elem : repo_path) { |
|
scottmg
2015/03/13 19:58:30
const?
tfarina
2015/03/13 23:27:49
Done.
|
| + ret = ret.Append(UTF8ToFilePath(base::IntToString(elem))); |
| } |
| return ret; |
| } |
| @@ -58,9 +58,9 @@ std::string RepoPathToTargetName(const std::vector<int>& repo_path, |
| std::string RepoPathToFullTargetName(const std::vector<int>& repo_path, |
| int target_index) { |
| std::string ret; |
| - for (size_t i = 0; i < repo_path.size(); i++) { |
| + for (auto& elem : repo_path) { |
| ret.push_back('/'); |
| - ret.append(base::IntToString(repo_path[i])); |
| + ret.append(base::IntToString(elem)); |
| } |
| ret += ":" + RepoPathToTargetName(repo_path, target_index); |