]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/timedelta.h
Assimilate exceptions and RefPtr from mspmisc
[libs/core.git] / source / time / timedelta.h
index 2d4649883088187fffca7994bcb6bcfc2f590397..6ebfcd86afc8b5c042f64b998623251d470aa628 100644 (file)
@@ -51,16 +51,16 @@ public:
        TimeDelta &operator-=(const TimeDelta &t)      { usec-=t.usec; return *this; }
 
        template<typename T>
        TimeDelta &operator-=(const TimeDelta &t)      { usec-=t.usec; return *this; }
 
        template<typename T>
-       TimeDelta operator*(T a) const                 { return TimeDelta((int64_t)(usec*a)); }
+       TimeDelta operator*(T a) const                 { return TimeDelta(int64_t(usec*a)); }
        template<typename T>
        template<typename T>
-       TimeDelta &operator*=(T a)                     { usec=(int64_t)(usec*a); return *this; }
+       TimeDelta &operator*=(T a)                     { usec=int64_t(usec*a); return *this; }
 
        template<typename T>
 
        template<typename T>
-       TimeDelta operator/(T a) const                 { return TimeDelta((int64_t)(usec/a)); }
+       TimeDelta operator/(T a) const                 { return TimeDelta(int64_t(usec/a)); }
        template<typename T>
        template<typename T>
-       TimeDelta &operator/=(T a)                     { usec=(int64_t)(usec/a); return *this; }
+       TimeDelta &operator/=(T a)                     { usec=int64_t(usec/a); return *this; }
 
 
-       double    operator/(const TimeDelta &t) const  { return (double)usec/t.usec; }
+       double    operator/(const TimeDelta &t) const  { return double(usec)/t.usec; }
 
        bool      operator>(const TimeDelta &t) const  { return usec>t.usec; }
        bool      operator>=(const TimeDelta &t) const { return usec>=t.usec; }
 
        bool      operator>(const TimeDelta &t) const  { return usec>t.usec; }
        bool      operator>=(const TimeDelta &t) const { return usec>=t.usec; }