diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-08-26 06:15:42 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2016-08-26 06:15:42 -0700 |
commit | eb5becd93f980992493fb2b4391490edf46a6f25 (patch) | |
tree | 5616a08826b413d6fbfcd8c132998c23382dff4d | |
parent | 88e5bce3dd3017a69ce122afd909f6ec0f684936 (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 |