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

Unified Diff: tools/gn/substitution_type.cc

Issue 1750283003: Minor fixes to tools/gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix last reference to IsValidToolSubstutition. Created 4 years, 10 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/substitution_type.h ('k') | tools/gn/substitution_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/substitution_type.cc
diff --git a/tools/gn/substitution_type.cc b/tools/gn/substitution_type.cc
index b92c75674fd763d05e8af91335e157e4cebde92e..b66e0870965d7dc26495643e73c45c750b5789a3 100644
--- a/tools/gn/substitution_type.cc
+++ b/tools/gn/substitution_type.cc
@@ -127,7 +127,7 @@ bool IsValidSourceSubstitution(SubstitutionType type) {
type == SUBSTITUTION_SOURCE_OUT_DIR;
}
-bool IsValidToolSubstutition(SubstitutionType type) {
brettw 2016/03/03 19:09:00 Wow, this is some awesome copy-and-paste thing I h
+bool IsValidToolSubstitution(SubstitutionType type) {
return type == SUBSTITUTION_LITERAL ||
type == SUBSTITUTION_OUTPUT ||
type == SUBSTITUTION_LABEL ||
@@ -140,7 +140,7 @@ bool IsValidToolSubstutition(SubstitutionType type) {
}
bool IsValidCompilerSubstitution(SubstitutionType type) {
- return IsValidToolSubstutition(type) ||
+ return IsValidToolSubstitution(type) ||
IsValidSourceSubstitution(type) ||
type == SUBSTITUTION_SOURCE ||
type == SUBSTITUTION_ASMFLAGS ||
@@ -155,12 +155,12 @@ bool IsValidCompilerSubstitution(SubstitutionType type) {
bool IsValidCompilerOutputsSubstitution(SubstitutionType type) {
// All tool types except "output" (which would be infinitely recursive).
- return (IsValidToolSubstutition(type) && type != SUBSTITUTION_OUTPUT) ||
+ return (IsValidToolSubstitution(type) && type != SUBSTITUTION_OUTPUT) ||
IsValidSourceSubstitution(type);
}
bool IsValidLinkerSubstitution(SubstitutionType type) {
- return IsValidToolSubstutition(type) ||
+ return IsValidToolSubstitution(type) ||
type == SUBSTITUTION_LINKER_INPUTS ||
type == SUBSTITUTION_LINKER_INPUTS_NEWLINE ||
type == SUBSTITUTION_LDFLAGS ||
@@ -176,7 +176,7 @@ bool IsValidLinkerOutputsSubstitution(SubstitutionType type) {
}
bool IsValidCopySubstitution(SubstitutionType type) {
- return IsValidToolSubstutition(type) ||
+ return IsValidToolSubstitution(type) ||
type == SUBSTITUTION_SOURCE;
}
@@ -187,7 +187,7 @@ bool EnsureValidSourcesSubstitutions(
for (size_t i = 0; i < types.size(); i++) {
if (!IsValidSourceSubstitution(types[i])) {
*err = Err(origin, "Invalid substitution type.",
- "The substitution " + std::string(kSubstitutionNames[i]) +
+ "The substitution " + std::string(kSubstitutionNames[types[i]]) +
" isn't valid for something\n"
"operating on a source file such as this.");
return false;
« no previous file with comments | « tools/gn/substitution_type.h ('k') | tools/gn/substitution_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698