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

Unified Diff: tools/gn/action_target_generator.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 | « no previous file | tools/gn/function_process_file_template.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/action_target_generator.cc
diff --git a/tools/gn/action_target_generator.cc b/tools/gn/action_target_generator.cc
index 5c7cbf67a8de2093676daea83feccdd8b38d6016..b7efa43f900639c81fb426596af565b2555abc87 100644
--- a/tools/gn/action_target_generator.cc
+++ b/tools/gn/action_target_generator.cc
@@ -4,6 +4,7 @@
#include "tools/gn/action_target_generator.h"
+#include "base/stl_util.h"
#include "tools/gn/build_settings.h"
#include "tools/gn/err.h"
#include "tools/gn/filesystem_utils.h"
@@ -73,10 +74,8 @@ void ActionTargetGenerator::DoRun() {
// together.
const auto& required_args_substitutions =
target_->action_values().args().required_types();
- bool has_rsp_file_name = std::find(required_args_substitutions.begin(),
- required_args_substitutions.end(),
- SUBSTITUTION_RSP_FILE_NAME) !=
- required_args_substitutions.end();
+ bool has_rsp_file_name = base::ContainsValue(required_args_substitutions,
+ SUBSTITUTION_RSP_FILE_NAME);
if (target_->action_values().uses_rsp_file() && !has_rsp_file_name) {
*err_ = Err(function_call_, "Missing {{response_file_name}} in args.",
"This target defines response_file_contents but doesn't use\n"
« no previous file with comments | « no previous file | tools/gn/function_process_file_template.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698