Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: tools/gn/function_process_file_template.cc

Issue 2938163003: Use ContainsValue() instead of std::find() in tools/ (Closed)
Patch Set: Fixing build error. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/action_target_generator.cc ('k') | tools/gn/runtime_deps_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/function_process_file_template.cc
diff --git a/tools/gn/function_process_file_template.cc b/tools/gn/function_process_file_template.cc
index 28e3e4683c6407db0783dcbebb39f723b11fb34d..47de6407f1aeb897ff75122574dbf0ee9ee7aaf8 100644
--- a/tools/gn/function_process_file_template.cc
+++ b/tools/gn/function_process_file_template.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/stl_util.h"
#include "tools/gn/functions.h"
#include "tools/gn/parse_tree.h"
#include "tools/gn/scope.h"
@@ -94,8 +95,7 @@ Value RunProcessFileTemplate(Scope* scope,
}
auto& types = subst.required_types();
- if (std::find(types.begin(), types.end(),
- SUBSTITUTION_SOURCE_TARGET_RELATIVE) != types.end()) {
+ if (base::ContainsValue(types, SUBSTITUTION_SOURCE_TARGET_RELATIVE)) {
*err = Err(template_arg, "Not a valid substitution type for the function.");
return Value();
}
« no previous file with comments | « tools/gn/action_target_generator.cc ('k') | tools/gn/runtime_deps_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698