aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fioramonti2018-06-04 03:36:18 -0700
committerDavid Fioramonti2018-06-04 03:36:27 -0700
commit2fcc4294987195ab4fd6c76e3dbdf4946462c327 (patch)
tree7c26e7366c171bd0b7d0211414896dc7bae20928
parent41e762afb259743d3089379a2e99402bccc7cad0 (diff)
downloadscummvm-rg350-2fcc4294987195ab4fd6c76e3dbdf4946462c327.tar.gz
scummvm-rg350-2fcc4294987195ab4fd6c76e3dbdf4946462c327.tar.bz2
scummvm-rg350-2fcc4294987195ab4fd6c76e3dbdf4946462c327.zip
COMMON: More nullptr usage in common/ptr
Replaces some more ptr=0 with ptr=nullptr.
-rw-r--r--common/ptr.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/common/ptr.h b/common/ptr.h
index 49a38e48bd..565c9d8cee 100644
--- a/common/ptr.h
+++ b/common/ptr.h
@@ -177,9 +177,9 @@ public:
*/
void reset() {
decRef();
- _deletion = 0;
- _refCount = 0;
- _pointer = 0;
+ _deletion = nullptr;
+ _refCount = nullptr;
+ _pointer = nullptr;
}
template<class T2>
@@ -233,7 +233,7 @@ public:
typedef T *PointerType;
typedef T &ReferenceType;
- explicit ScopedPtr(PointerType o = 0) : _pointer(o) {}
+ explicit ScopedPtr(PointerType o = nullptr) : _pointer(o) {}
ReferenceType operator*() const { return *_pointer; }
PointerType operator->() const { return _pointer; }
@@ -251,7 +251,7 @@ public:
/**
* Resets the pointer with the new value. Old object will be destroyed
*/
- void reset(PointerType o = 0) {
+ void reset(PointerType o = nullptr) {
D()(_pointer);
_pointer = o;
}
@@ -271,7 +271,7 @@ public:
*/
PointerType release() {
PointerType r = _pointer;
- _pointer = 0;
+ _pointer = nullptr;
return r;
}