]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/refptr.h
Fix JIS X 0208 encoding
[libs/core.git] / source / core / refptr.h
index 6285d0ef4031e2e1bc29a1a0495b3e67bc5721dc..70cb17607361364de990f8828643f80af8d8da00 100644 (file)
@@ -35,7 +35,7 @@ private:
        RefCounts *counts = 0;
 
 public:
-       RefPtr() { }
+       RefPtr() = default;
        RefPtr(T *d): data(d), counts(data ? new RefCounts : 0) { incref(); }
 private:
        RefPtr(T *d, RefCounts *c): data(d), counts(d ? c : 0) { incref(); }
@@ -81,7 +81,7 @@ public:
        T *get() const { return data; }
        T &operator*() const { return *data; }
        T *operator->() const { return data; }
-       operator bool() const { return data!=0; }
+       explicit operator bool() const { return data!=0; }
 
        unsigned refcount() const { return (data ? counts->count : 0); }
 
@@ -106,7 +106,7 @@ private:
        RefCounts *counts = 0;
 
 public:
-       WeakPtr() { }
+       WeakPtr() = default;
 private:
        WeakPtr(T *d, RefCounts *c): data(d), counts(d ? c : 0) { incref(); }