diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-08-26 06:15:42 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2016-09-20 04:47:49 -0700 |
commit | e26095449c5b55172b8c7bb4ece81de26e52b9e6 (patch) | |
tree | b783ebae75ebee9922e2e974fc1f418a07f067ba | |
parent | 922ccb76513248c46a548694b22371306e7afc7b (diff) |
itemfield.cpp: gcc6/C++14 compatibility
Recent gcc and/or C++14 changed the definition of abs() such that
applying it to a 16bit integer resulted in a float, leading to:
itemfield.cpp:1491:27: error: invalid operands of types
'__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'const int' to
binary 'operator%'
(uInt16)(abs(moffs) % MinsPerHour)
-rw-r--r-- | src/sysync/itemfield.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sysync/itemfield.cpp b/src/sysync/itemfield.cpp index 64867e0..f6ecf93 100644 --- a/src/sysync/itemfield.cpp +++ b/src/sysync/itemfield.cpp @@ -1487,8 +1487,8 @@ void TTimestampField::getAsRFC822date(string &aRFC822String, timecontext_t aTarg aRFC822String, " %c%02hd%02hd", moffs>=0 ? '+' : '-', - (uInt16)(abs(moffs) / MinsPerHour), - (uInt16)(abs(moffs) % MinsPerHour) + (uInt16)(abs((int)moffs) / MinsPerHour), + (uInt16)(abs((int)moffs) % MinsPerHour) ); } } // TTimestampField::getAsRFC822date |