diff options
author | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 22:02:02 +0000 |
---|---|---|
committer | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 22:02:02 +0000 |
commit | 7dcce17ae227d749d7684784fd212789a686b28a (patch) | |
tree | 8a72faa6fccd98ae06e08a284c796fa51ff1983c /base | |
parent | 0fb75e887c8fd4434214f0824935d3403a6f6962 (diff) | |
download | chromium_src-7dcce17ae227d749d7684784fd212789a686b28a.zip chromium_src-7dcce17ae227d749d7684784fd212789a686b28a.tar.gz chromium_src-7dcce17ae227d749d7684784fd212789a686b28a.tar.bz2 |
remove redundant DCHECK that a size_t variable >= 0
SampleVector::GetCountAtIndex has a DCHECK which checks that a size_t
variable is >= 0 and then some other condition. But size_t is an
unsigned type so the first part of the check is useless (and it
gives an error because of this with clang).
Review URL: https://chromiumcodereview.appspot.com/13006014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190776 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/metrics/sample_vector.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/metrics/sample_vector.cc b/base/metrics/sample_vector.cc index f90d80b..8f14510 100644 --- a/base/metrics/sample_vector.cc +++ b/base/metrics/sample_vector.cc @@ -43,7 +43,7 @@ Count SampleVector::TotalCount() const { } Count SampleVector::GetCountAtIndex(size_t bucket_index) const { - DCHECK(bucket_index >= 0 && bucket_index < counts_.size()); + DCHECK(bucket_index < counts_.size()); return counts_[bucket_index]; } |