summaryrefslogtreecommitdiffstats
path: root/base/win/scoped_comptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/win/scoped_comptr.h')
-rw-r--r--base/win/scoped_comptr.h6
1 files changed, 3 insertions, 3 deletions
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;