diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 19:12:30 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-01 19:12:30 +0000 |
commit | 4c98db35cdd001ce1585bc703375c92ec3ebea9b (patch) | |
tree | 708cbf3d2516c128c8aeff6512a650d8735c2bcf /app | |
parent | 4c9cc6c9d2c3c801088337f56e7270459beb3289 (diff) | |
download | chromium_src-4c98db35cdd001ce1585bc703375c92ec3ebea9b.zip chromium_src-4c98db35cdd001ce1585bc703375c92ec3ebea9b.tar.gz chromium_src-4c98db35cdd001ce1585bc703375c92ec3ebea9b.tar.bz2 |
Coverity: Remove a check for < 0 on an unsigned int.
CID=4546
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/249047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/l10n_util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/l10n_util.h b/app/l10n_util.h index 5e50d6e..be15a4e 100644 --- a/app/l10n_util.h +++ b/app/l10n_util.h @@ -8,13 +8,13 @@ #ifndef APP_L10N_UTIL_H_ #define APP_L10N_UTIL_H_ -#include "build/build_config.h" - #include <algorithm> #include <functional> #include <string> #include <vector> +#include "build/build_config.h" + #include "base/basictypes.h" #include "base/logging.h" #include "base/scoped_ptr.h" @@ -327,12 +327,12 @@ void SortStringsUsingMethod(const std::wstring& locale, scoped_ptr<icu::Collator> collator(icu::Collator::createInstance(loc, error)); if (U_FAILURE(error)) { sort(elements->begin(), elements->end(), - StringMethodComparator<T,Method>(method)); + StringMethodComparator<T, Method>(method)); return; } std::sort(elements->begin(), elements->end(), - StringMethodComparatorWithCollator<T,Method>(collator.get(), method)); + StringMethodComparatorWithCollator<T, Method>(collator.get(), method)); } // Compares two elements' string keys and returns true if the first element's @@ -377,7 +377,7 @@ void SortVectorWithStringKey(const std::string& locale, unsigned int begin_index, unsigned int end_index, bool needs_stable_sort) { - DCHECK(begin_index >= 0 && begin_index < end_index && + DCHECK(begin_index < end_index && end_index <= static_cast<unsigned int>(elements->size())); UErrorCode error = U_ZERO_ERROR; icu::Locale loc(locale.c_str()); |