X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Ftimedelta.h;h=1a4274ba3a35c05822ad6f18c43775cf02e592e4;hp=332683533cad5e3fea5e076360bb50fb2fa1714c;hb=9990be018b49e5aae27218e1b8c6aefdb63b38a7;hpb=122846f0881673770d88eff7d925ecf25c01b62e diff --git a/source/time/timedelta.h b/source/time/timedelta.h index 3326835..1a4274b 100644 --- a/source/time/timedelta.h +++ b/source/time/timedelta.h @@ -19,7 +19,7 @@ private: public: /** Constructs a zero TimeDelta. */ - TimeDelta() { } + TimeDelta() = default; /** Constructs a TimeDelta from a plain number. The purpose of this is to allow serialization together with the raw() function. */ @@ -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