summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-19 17:05:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-19 17:05:55 +0200
commitec49915442055f5b8f0055f2c250a0da096a3c1b (patch)
treefc73cc1c0467b63133b4449326132fe63abe2635 /tools
parentc7d485d8fc6fe654a428fe25f82bbf89c2149ef5 (diff)
Wrap large values in SAL_CONST_UINT64
Change-Id: I865808911043a61de5c4209fa889dbff7c8baf28
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/time.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx
index 1c3dc6113de5..6a52f2678013 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;