X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Frefptr.h;fp=source%2Fcore%2Frefptr.h;h=6285d0ef4031e2e1bc29a1a0495b3e67bc5721dc;hp=a2160a52c50b1799ce45d87903de94ff2474eaf5;hb=122846f0881673770d88eff7d925ecf25c01b62e;hpb=b116e161e377da0e4e52f07745ecb2d22f962ae9 diff --git a/source/core/refptr.h b/source/core/refptr.h index a2160a5..6285d0e 100644 --- a/source/core/refptr.h +++ b/source/core/refptr.h @@ -31,11 +31,11 @@ class RefPtr template friend class WeakPtr; private: - T *data; - RefCounts *counts; + T *data = 0; + RefCounts *counts = 0; public: - RefPtr(): data(0), counts(0) { } + RefPtr() { } RefPtr(T *d): data(d), counts(data ? new RefCounts : 0) { incref(); } private: RefPtr(T *d, RefCounts *c): data(d), counts(d ? c : 0) { incref(); } @@ -102,11 +102,11 @@ class WeakPtr template friend class WeakPtr; private: - T *data; - RefCounts *counts; + T *data = 0; + RefCounts *counts = 0; public: - WeakPtr(): data(0), counts(0) { } + WeakPtr() { } private: WeakPtr(T *d, RefCounts *c): data(d), counts(d ? c : 0) { incref(); }