[Scummvm-git-logs] scummvm master -> f92ab7cacc1b026a28b5ff89e8e712393b1d0fdc

bgK bastien.bouclet at gmail.com
Wed Jun 6 21:13:05 CEST 2018


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2fcc429498 COMMON: More nullptr usage in common/ptr
f92ab7cacc Merge pull request #1211 from dafioram/morePtrNull


Commit: 2fcc4294987195ab4fd6c76e3dbdf4946462c327
    https://github.com/scummvm/scummvm/commit/2fcc4294987195ab4fd6c76e3dbdf4946462c327
Author: David Fioramonti (dafioram at gmail.com)
Date: 2018-06-04T03:36:27-07:00

Commit Message:
COMMON: More nullptr usage in common/ptr

Replaces some more ptr=0 with ptr=nullptr.

Changed paths:
    common/ptr.h


diff --git a/common/ptr.h b/common/ptr.h
index 49a38e4..565c9d8 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;
 	}
 


Commit: f92ab7cacc1b026a28b5ff89e8e712393b1d0fdc
    https://github.com/scummvm/scummvm/commit/f92ab7cacc1b026a28b5ff89e8e712393b1d0fdc
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-06-06T21:13:00+02:00

Commit Message:
Merge pull request #1211 from dafioram/morePtrNull

COMMON: More nullptr usage in common/ptr

Changed paths:
    common/ptr.h







More information about the Scummvm-git-logs mailing list