Changeset 10768 for code/branches/cpp11_v2/src/libraries/util/SharedPtr.h
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/util/SharedPtr.h
r10765 r10768 216 216 public: 217 217 /// Default constructor, the pointer is set to nullptr. 218 inline SharedPtr() : pointer_( 0), counter_(0)218 inline SharedPtr() : pointer_(nullptr), counter_(nullptr) 219 219 { 220 220 } 221 221 222 222 /// Constructor, creates a SharedPtr that points to @a pointer, increments the counter. 223 inline SharedPtr(T* pointer) : pointer_(pointer), counter_( 0)223 inline SharedPtr(T* pointer) : pointer_(pointer), counter_(nullptr) 224 224 { 225 225 if (this->pointer_) … … 293 293 inline T* operator->() const 294 294 { 295 assert(this->pointer_ != 0);295 assert(this->pointer_ != nullptr); 296 296 return this->pointer_; 297 297 } … … 300 300 inline T& operator*() const 301 301 { 302 assert(this->pointer_ != 0);302 assert(this->pointer_ != nullptr); 303 303 return *this->pointer_; 304 304 } … … 313 313 inline operator bool() const 314 314 { 315 return (this->pointer_ != 0);315 return (this->pointer_ != nullptr); 316 316 } 317 317
Note: See TracChangeset
for help on using the changeset viewer.