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

Unified Diff: net/tools/tld_cleanup/tld_cleanup.cc

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: net/tools/tld_cleanup/tld_cleanup.cc
diff --git a/net/tools/tld_cleanup/tld_cleanup.cc b/net/tools/tld_cleanup/tld_cleanup.cc
index be723c45ed4b5cf0d5e8b0535b0b5671f4ecb3cb..7a8aea8f72a4bcd85811b7050ddae660765157ce 100644
--- a/net/tools/tld_cleanup/tld_cleanup.cc
+++ b/net/tools/tld_cleanup/tld_cleanup.cc
@@ -106,13 +106,13 @@ NormalizeResult NormalizeRule(std::string* domain, Rule* rule) {
// Strip single leading and trailing dots.
if (domain->at(0) == '.')
domain->erase(0, 1);
- if (domain->size() == 0) {
+ if (domain->empty()) {
LOG(WARNING) << "Ignoring empty rule";
return kWarning;
}
if (domain->at(domain->size() - 1) == '.')
domain->erase(domain->size() - 1, 1);
- if (domain->size() == 0) {
+ if (domain->empty()) {
LOG(WARNING) << "Ignoring empty rule";
return kWarning;
}
@@ -126,7 +126,7 @@ NormalizeResult NormalizeRule(std::string* domain, Rule* rule) {
domain->erase(0, 2);
rule->wildcard = true;
}
- if (domain->size() == 0) {
+ if (domain->empty()) {
LOG(WARNING) << "Ignoring empty rule";
return kWarning;
}

Powered by Google App Engine
This is Rietveld 408576698