tools/inc/tools/time.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit ec49915442055f5b8f0055f2c250a0da096a3c1b Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Apr 19 17:05:55 2013 +0200 Wrap large values in SAL_CONST_UINT64 Change-Id: I865808911043a61de5c4209fa889dbff7c8baf28 diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx index 1c3dc61..6a52f26 100644 --- a/tools/inc/tools/time.hxx +++ b/tools/inc/tools/time.hxx @@ -78,16 +78,16 @@ public: void SetNanoSec( sal_uInt32 nNewNanoSec ); sal_uInt16 GetHour() const { sal_uInt64 nTempTime = (nTime >= 0) ? nTime : -nTime; - return static_cast<sal_uInt16>(nTempTime / 10000000000000); } + return static_cast<sal_uInt16>(nTempTime / SAL_CONST_UINT64(10000000000000)); } sal_uInt16 GetMin() const { sal_uInt64 nTempTime = (nTime >= 0) ? nTime : -nTime; - return static_cast<sal_uInt16>((nTempTime / 100000000000) % 100); } + return static_cast<sal_uInt16>((nTempTime / SAL_CONST_UINT64(100000000000)) % 100); } sal_uInt16 GetSec() const { sal_uInt64 nTempTime = (nTime >= 0) ? nTime : -nTime; - return static_cast<sal_uInt16>((nTempTime / 1000000000) % 100); } + return static_cast<sal_uInt16>((nTempTime / SAL_CONST_UINT64(1000000000)) % 100); } sal_uInt32 GetNanoSec() const { sal_uInt64 nTempTime = (nTime >= 0) ? nTime : -nTime; - return static_cast<sal_uInt32>( nTempTime % 1000000000); } + return static_cast<sal_uInt32>( nTempTime % SAL_CONST_UINT64(1000000000)); } // TODO: consider removing GetMSFromTime and MakeTimeFromMS? sal_Int32 GetMSFromTime() const; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits