summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
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;
}