]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/timedelta.h
Mark boolean conversion operators as explicit
[libs/core.git] / source / time / timedelta.h
index a3e62f161c33684f13b90444e23b40fda02567f4..1a4274ba3a35c05822ad6f18c43775cf02e592e4 100644 (file)
@@ -54,7 +54,7 @@ public:
        bool operator==(const TimeDelta &t) const { return usec==t.usec; }
        bool operator!=(const TimeDelta &t) const { return usec!=t.usec; }
 
-       operator const void *() const { return usec ? this : 0; }
+       explicit operator bool() const { return usec; }
 };
 
 template<typename T>