summaryrefslogtreecommitdiffstats
path: root/courgette
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 /courgette
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 'courgette')
-rw-r--r--courgette/adjustment_method_2.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index e3ca315..4a3d1c1 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -988,10 +988,10 @@ class AssignmentProblem {
if (single_use_score > 0) {
size_t n = single_use_pattern_queue_.erase(pattern);
LOG_ASSERT(n == 1);
- } else if (pattern->program_histogram_.size() == 0 &&
- pattern->model_histogram_.size() == 0) {
+ } else if (pattern->program_histogram_.empty() &&
+ pattern->model_histogram_.empty()) {
NOTREACHED(); // Should not come back to life.
- } else if (pattern->program_histogram_.size() == 0) {
+ } else if (pattern->program_histogram_.empty()) {
// Useless pattern.
} else {
active_non_single_use_patterns_.erase(pattern);
@@ -1003,9 +1003,9 @@ class AssignmentProblem {
int single_use_score = SingleUseScore(pattern);
if (single_use_score > 0) {
single_use_pattern_queue_.insert(pattern);
- } else if (pattern->program_histogram_.size() == 0 &&
- pattern->model_histogram_.size() == 0) {
- } else if (pattern->program_histogram_.size() == 0) {
+ } else if (pattern->program_histogram_.empty() &&
+ pattern->model_histogram_.empty()) {
+ } else if (pattern->program_histogram_.empty()) {
// Useless pattern.
} else {
active_non_single_use_patterns_.insert(pattern);