diff options
author | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 02:48:05 +0000 |
---|---|---|
committer | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 02:48:05 +0000 |
commit | 5d2b449b4f0b3d13c75e540c834c550ed38c0912 (patch) | |
tree | 6224e6d93676677f19fb03e7d80b46ea15dcf3b5 /base/win | |
parent | c4e678d0902b04606ff2a21714e33643d01a74ed (diff) | |
download | chromium_src-5d2b449b4f0b3d13c75e540c834c550ed38c0912.zip chromium_src-5d2b449b4f0b3d13c75e540c834c550ed38c0912.tar.gz chromium_src-5d2b449b4f0b3d13c75e540c834c550ed38c0912.tar.bz2 |
More DCHECK() updates. A mixture of _EQ and _GE.
Bug=58409
Review URL: http://codereview.chromium.org/6469070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r-- | base/win/scoped_bstr.cc | 2 | ||||
-rw-r--r-- | base/win/scoped_comptr.h | 6 | ||||
-rw-r--r-- | base/win/scoped_variant.cc | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/base/win/scoped_bstr.cc b/base/win/scoped_bstr.cc index 18ffe6a..63ade0c 100644 --- a/base/win/scoped_bstr.cc +++ b/base/win/scoped_bstr.cc @@ -39,7 +39,7 @@ void ScopedBstr::Swap(ScopedBstr& bstr2) { } BSTR* ScopedBstr::Receive() { - DCHECK(bstr_ == NULL) << "BSTR leak."; + DCHECK(!bstr_) << "BSTR leak."; return &bstr_; } diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h index 6375218..e508ef2 100644 --- a/base/win/scoped_comptr.h +++ b/base/win/scoped_comptr.h @@ -69,7 +69,7 @@ class ScopedComPtr : public scoped_refptr<Interface> { // Accepts an interface pointer that has already been addref-ed. void Attach(Interface* p) { - DCHECK(ptr_ == NULL); + DCHECK(!ptr_); ptr_ = p; } @@ -78,7 +78,7 @@ class ScopedComPtr : public scoped_refptr<Interface> { // The function DCHECKs on the current value being NULL. // Usage: Foo(p.Receive()); Interface** Receive() { - DCHECK(ptr_ == NULL) << "Object leak. Pointer must be NULL"; + DCHECK(!ptr_) << "Object leak. Pointer must be NULL"; return &ptr_; } @@ -114,7 +114,7 @@ class ScopedComPtr : public scoped_refptr<Interface> { // Convenience wrapper around CoCreateInstance HRESULT CreateInstance(const CLSID& clsid, IUnknown* outer = NULL, DWORD context = CLSCTX_ALL) { - DCHECK(ptr_ == NULL); + DCHECK(!ptr_); HRESULT hr = ::CoCreateInstance(clsid, outer, context, *interface_id, reinterpret_cast<void**>(&ptr_)); return hr; diff --git a/base/win/scoped_variant.cc b/base/win/scoped_variant.cc index 40ccdf2..f57ab93 100644 --- a/base/win/scoped_variant.cc +++ b/base/win/scoped_variant.cc @@ -211,7 +211,7 @@ void ScopedVariant::Set(SAFEARRAY* array) { var_.vt |= VT_ARRAY; var_.parray = array; } else { - DCHECK(array == NULL) << "Unable to determine safearray vartype"; + DCHECK(!array) << "Unable to determine safearray vartype"; var_.vt = VT_EMPTY; } } |