diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2016-09-11 11:02:43 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2016-09-11 11:02:43 +0200 |
commit | e24061216228b5ead1ea90e3e9d0d4df8df8b8f4 (patch) | |
tree | 66bae31b990660338ab1fb6c8a4b63e8206a02f0 | |
parent | 5a33d55ef56723226a3d4ac779ecd4fe96530c38 (diff) | |
download | ATCD-e24061216228b5ead1ea90e3e9d0d4df8df8b8f4.tar.gz |
Use std::abs instead of abs
* ACE/ace/Time_Value.cpp:
-rw-r--r-- | ACE/ace/Time_Value.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ACE/ace/Time_Value.cpp b/ACE/ace/Time_Value.cpp index b390d815bc4..0cad794c554 100644 --- a/ACE/ace/Time_Value.cpp +++ b/ACE/ace/Time_Value.cpp @@ -18,6 +18,8 @@ # include <iomanip> #endif /* ACE_HAS_CPP98_IOSTREAMS */ +#include <cstdlib> + #ifdef ACE_HAS_CPP11 # include <cmath> #endif /* ACE_HAS_CPP11 */ @@ -178,7 +180,7 @@ ACE_Time_Value::normalize (bool saturate) if (this->tv_.tv_usec >= ACE_ONE_SECOND_IN_USECS || this->tv_.tv_usec <= -ACE_ONE_SECOND_IN_USECS) { - time_t sec = abs(this->tv_.tv_usec) / ACE_ONE_SECOND_IN_USECS * (this->tv_.tv_usec > 0 ? 1 : -1); + time_t sec = std::abs(this->tv_.tv_usec) / ACE_ONE_SECOND_IN_USECS * (this->tv_.tv_usec > 0 ? 1 : -1); suseconds_t usec = this->tv_.tv_usec - sec * ACE_ONE_SECOND_IN_USECS; if (saturate && this->tv_.tv_sec > 0 && sec > 0 && |