Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Unified Diff: base/win/scoped_comptr.h

Issue 6469070: More DCHECK() updates. A mixture of _EQ and _GE. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updating pickle.h order Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/scoped_bstr.cc ('k') | base/win/scoped_variant.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_comptr.h
diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h
index 6375218822df5436cb64ef3fc540ca3880e71750..e508ef2ce7ce31c561527d911f1e2032b292dced 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;
« no previous file with comments | « base/win/scoped_bstr.cc ('k') | base/win/scoped_variant.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698