summaryrefslogtreecommitdiff
path: root/sax
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-03 10:30:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-02-05 14:52:58 +0000
commit3d1638e9deded1b10a38720ef61077ebb8881d47 (patch)
tree2a387d3260451cfe70ad910052038766b6018ec1 /sax
parent113f000d38c34dd4dda6903976f8febf6d95375c (diff)
fix gcc build error
error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator%' apparently there's a template returning double for abs for the non-int/long/float/double argument case. So promote earlier to int so the abs<int> is called Change-Id: I882a27c5ec349f894c1c9f4857687360a46b55ae (cherry picked from commit b9fa2963cf12e6987b3a0acc219c4fa591e41be8) Reviewed-on: https://gerrit.libreoffice.org/22071 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sax')
-rw-r--r--sax/source/tools/converter.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index b4eb276813ee..3e2cbc983068 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1250,7 +1250,7 @@ bool Converter::convertDuration(util::Duration& rDuration,
static void
-lcl_AppendTimezone(OUStringBuffer & i_rBuffer, sal_Int16 const nOffset)
+lcl_AppendTimezone(OUStringBuffer & i_rBuffer, int const nOffset)
{
if (0 == nOffset)
{
@@ -1435,7 +1435,7 @@ lcl_MaxDaysPerMonth(const sal_Int32 nMonth, const sal_Int32 nYear)
static void lcl_ConvertToUTC(
sal_Int16 & o_rYear, sal_uInt16 & o_rMonth, sal_uInt16 & o_rDay,
sal_uInt16 & o_rHours, sal_uInt16 & o_rMinutes,
- sal_Int16 const nSourceOffset)
+ int const nSourceOffset)
{
sal_Int16 nOffsetHours(abs(nSourceOffset) / 60);
sal_Int16 const nOffsetMinutes(abs(nSourceOffset) % 60);