]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/handle.h
Use nullptr instead of 0 for pointers
[libs/core.git] / source / io / handle.h
index be2097e7f248d042c95312185ec40a25e3dca55b..6140e116d74fb497d83085d921e11b515084616a 100644 (file)
@@ -12,7 +12,7 @@ public:
        struct Private;
 
 private:
-       Private *priv;
+       Private *priv = nullptr;
 
 public:
        Handle();
@@ -23,10 +23,7 @@ public:
        Private &operator*() { return *priv; }
        const Private &operator*() const { return *priv; }
 
-       /** This is effectively a boolean conversion, but avoids accidental
-       conversion to OS native handles.  Unix-based systems use int and win32 uses
-       void *; const void * is not implicitly convertible to either. */
-       operator const void *() const;
+       explicit operator bool() const;
 };