X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fio%2Fhandle.h;h=6140e116d74fb497d83085d921e11b515084616a;hb=85ef592fb1eab68283b12607701e4fb9b9014630;hp=3e06c71de5500e095195102da434dc0dc3aec273;hpb=122846f0881673770d88eff7d925ecf25c01b62e;p=libs%2Fcore.git diff --git a/source/io/handle.h b/source/io/handle.h index 3e06c71..6140e11 100644 --- a/source/io/handle.h +++ b/source/io/handle.h @@ -12,7 +12,7 @@ public: struct Private; private: - Private *priv = 0; + 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; };