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

Unified Diff: tools/gn/pattern.cc

Issue 798333005: tools/gn: Pass clang-modernize -use-nullptr over it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Brett's review - revert some clang-format changes Created 6 years 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/parser.cc ('k') | tools/gn/scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/pattern.cc
diff --git a/tools/gn/pattern.cc b/tools/gn/pattern.cc
index 7747d6259381fdbb6b17a4dae7e23652bd191d31..10ff5a436505d8c5ec3d5380fa4f14988cb557ad 100644
--- a/tools/gn/pattern.cc
+++ b/tools/gn/pattern.cc
@@ -11,7 +11,7 @@ namespace {
void ParsePattern(const std::string& s, std::vector<Pattern::Subrange>* out) {
// Set when the last subrange is a literal so we can just append when we
// find another literal.
- Pattern::Subrange* last_literal = NULL;
+ Pattern::Subrange* last_literal = nullptr;
for (size_t i = 0; i < s.size(); i++) {
if (s[i] == '*') {
@@ -19,13 +19,13 @@ void ParsePattern(const std::string& s, std::vector<Pattern::Subrange>* out) {
if (out->size() == 0 ||
(*out)[out->size() - 1].type != Pattern::Subrange::ANYTHING)
out->push_back(Pattern::Subrange(Pattern::Subrange::ANYTHING));
- last_literal = NULL;
+ last_literal = nullptr;
} else if (s[i] == '\\') {
if (i < s.size() - 1 && s[i + 1] == 'b') {
// "\b" means path boundary.
i++;
out->push_back(Pattern::Subrange(Pattern::Subrange::PATH_BOUNDARY));
- last_literal = NULL;
+ last_literal = nullptr;
} else {
// Backslash + anything else means that literal char.
if (!last_literal) {
« no previous file with comments | « tools/gn/parser.cc ('k') | tools/gn/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698