diff options
author | kushi.p@gmail.com <kushi.p@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-13 22:13:33 +0000 |
---|---|---|
committer | kushi.p@gmail.com <kushi.p@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-13 22:13:33 +0000 |
commit | 88563f68ec16520622e52672f352bee026865557 (patch) | |
tree | e7e5dc554372b4bc695a7dad9908732a6f527156 | |
parent | 6275aa9b9c9237147d7a2dc74a60da5bd68a21ef (diff) | |
download | chromium_src-88563f68ec16520622e52672f352bee026865557.zip chromium_src-88563f68ec16520622e52672f352bee026865557.tar.gz chromium_src-88563f68ec16520622e52672f352bee026865557.tar.bz2 |
Continuing with DCHECK() replacement. Switching to DCHECK_GT for better debug of broken contracts
BUG=58409
Review URL: http://codereview.chromium.org/6690002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77977 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | app/sql/connection.cc | 2 | ||||
-rw-r--r-- | base/mac/foundation_util.mm | 4 | ||||
-rw-r--r-- | base/path_service.cc | 4 | ||||
-rw-r--r-- | base/rand_util.cc | 2 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_mac.mm | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/app/sql/connection.cc b/app/sql/connection.cc index 0217b4e..003f7b2 100644 --- a/app/sql/connection.cc +++ b/app/sql/connection.cc @@ -139,7 +139,7 @@ void Connection::Preload() { bool Connection::BeginTransaction() { if (needs_rollback_) { - DCHECK(transaction_nesting_ > 0); + DCHECK_GT(transaction_nesting_, 0); // When we're going to rollback, fail on this begin and don't actually // mark us as entering the nested transaction. diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm index 7a777dd..146f2ca 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -168,7 +168,7 @@ FilePath GetAppBundlePath(const FilePath& exec_name) { // Don't prepend '/' to the first component. std::vector<std::string>::const_iterator it = components.begin(); std::string bundle_name = *it; - DCHECK(it->length() > 0); + DCHECK_GT(it->length(), 0U); // If the first component ends in ".app", we're already done. if (it->length() > kExtLength && !it->compare(it->length() - kExtLength, kExtLength, kExt, kExtLength)) @@ -181,7 +181,7 @@ FilePath GetAppBundlePath(const FilePath& exec_name) { // Go through the remaining components. for (++it; it != components.end(); ++it) { - DCHECK(it->length() > 0); + DCHECK_GT(it->length(), 0U); bundle_name += *it; diff --git a/base/path_service.cc b/base/path_service.cc index 117feb5..1262f68 100644 --- a/base/path_service.cc +++ b/base/path_service.cc @@ -208,7 +208,7 @@ bool PathService::Get(int key, FilePath* result) { bool PathService::Override(int key, const FilePath& path) { PathData* path_data = GetPathData(); DCHECK(path_data); - DCHECK(key > base::DIR_CURRENT) << "invalid path key"; + DCHECK_GT(key, base::DIR_CURRENT) << "invalid path key"; FilePath file_path = path; @@ -241,7 +241,7 @@ void PathService::RegisterProvider(ProviderFunc func, int key_start, int key_end) { PathData* path_data = GetPathData(); DCHECK(path_data); - DCHECK(key_end > key_start); + DCHECK_GT(key_end, key_start); base::AutoLock scoped_lock(path_data->lock); diff --git a/base/rand_util.cc b/base/rand_util.cc index 0576c94..4a455f1 100644 --- a/base/rand_util.cc +++ b/base/rand_util.cc @@ -37,7 +37,7 @@ double RandDouble() { } uint64 RandGenerator(uint64 max) { - DCHECK(max > 0); + DCHECK_GT(max, 0ULL); return base::RandUint64() % max; } diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm index 5e1de22..8904667 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm +++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm @@ -193,7 +193,7 @@ AutocompleteEditViewMac::AutocompleteEditViewMac( layoutManager([[NSLayoutManager alloc] init]); [layoutManager setUsesScreenFonts:YES]; line_height_ = [layoutManager defaultLineHeightForFont:GetFieldFont()]; - DCHECK(line_height_ > 0); + DCHECK_GT(line_height_, 0); } AutocompleteEditViewMac::~AutocompleteEditViewMac() { |