summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 00:03:18 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 00:03:18 +0000
commitf6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3 (patch)
tree840cfc698d0c1287ef8802ca9a564ae7abdd0f13 /net/tools
parent9ad77099038a76c96f6c4d162fb0706426215a5f (diff)
downloadchromium_src-f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3.zip
chromium_src-f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3.tar.gz
chromium_src-f6b8ce31c12a8fd5c969608bfdec0e2e8f1e99c3.tar.bz2
Pure pedantry: Replace all ".size() == 0" with ".empty()".
BUG=carnitas TEST=compiles; existing unit tests. Review URL: http://codereview.chromium.org/6602049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/flip_server/split.cc2
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.cc6
2 files changed, 4 insertions, 4 deletions
diff --git a/net/tools/flip_server/split.cc b/net/tools/flip_server/split.cc
index 6ab50cf..2d8659a 100644
--- a/net/tools/flip_server/split.cc
+++ b/net/tools/flip_server/split.cc
@@ -19,7 +19,7 @@ void SplitStringPieceToVector(const base::StringPiece& full,
std::vector<base::StringPiece>* vec,
bool omit_empty_strings) {
vec->clear();
- if (full.size() == 0 || delim[0] == '\0')
+ if (full.empty() || delim[0] == '\0')
return;
if (delim[1] == '\0') {
diff --git a/net/tools/tld_cleanup/tld_cleanup.cc b/net/tools/tld_cleanup/tld_cleanup.cc
index be723c4..7a8aea8f 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;
}