diff options
Diffstat (limited to 'sal/osl/w32/time.cxx')
-rw-r--r-- | sal/osl/w32/time.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sal/osl/w32/time.cxx b/sal/osl/w32/time.cxx index 51f05ab30a4c..d1284b663fae 100644 --- a/sal/osl/w32/time.cxx +++ b/sal/osl/w32/time.cxx @@ -70,8 +70,8 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal) Value = *reinterpret_cast<__int64 *>(&CurTime) - *reinterpret_cast<__int64 *>(&OffTime); - pTimeVal->Seconds = (unsigned long) (Value / 10000000L); - pTimeVal->Nanosec = (unsigned long)((Value % 10000000L) * 100); + pTimeVal->Seconds = static_cast<unsigned long>(Value / 10000000L); + pTimeVal->Nanosec = static_cast<unsigned long>((Value % 10000000L) * 100); return true; } @@ -143,9 +143,9 @@ sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVa if ( Success== TIME_ZONE_ID_DAYLIGHT ) bias+=aTimeZoneInformation.DaylightBias; - if ( (sal_Int64) pSystemTimeVal->Seconds > ( bias * 60 ) ) + if ( static_cast<sal_Int64>(pSystemTimeVal->Seconds) > ( bias * 60 ) ) { - pLocalTimeVal->Seconds = (sal_uInt32) (pSystemTimeVal->Seconds - ( bias * 60) ); + pLocalTimeVal->Seconds = static_cast<sal_uInt32>(pSystemTimeVal->Seconds - ( bias * 60) ); pLocalTimeVal->Nanosec = pSystemTimeVal->Nanosec; return true; @@ -170,9 +170,9 @@ sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal if ( Success== TIME_ZONE_ID_DAYLIGHT ) bias+=aTimeZoneInformation.DaylightBias; - if ( (sal_Int64) pLocalTimeVal->Seconds + ( bias * 60 ) > 0 ) + if ( static_cast<sal_Int64>(pLocalTimeVal->Seconds) + ( bias * 60 ) > 0 ) { - pSystemTimeVal->Seconds = (sal_uInt32) ( pLocalTimeVal->Seconds + ( bias * 60) ); + pSystemTimeVal->Seconds = static_cast<sal_uInt32>( pLocalTimeVal->Seconds + ( bias * 60) ); pSystemTimeVal->Nanosec = pLocalTimeVal->Nanosec; return true; @@ -195,9 +195,9 @@ sal_uInt32 SAL_CALL osl_getGlobalTimer(void) _ftime( ¤tTime ); - nSeconds = (sal_uInt32)( currentTime.time - startTime.time ); + nSeconds = static_cast<sal_uInt32>( currentTime.time - startTime.time ); - return ( nSeconds * 1000 ) + (long)( currentTime.millitm - startTime.millitm ); + return ( nSeconds * 1000 ) + static_cast<long>( currentTime.millitm - startTime.millitm ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |