diff options
author | Johnny Willemsen <jwillemsen@users.noreply.github.com> | 2016-09-11 12:45:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-11 12:45:10 +0200 |
commit | 37ce198752139f0886592ff78879d0051736bb9a (patch) | |
tree | 611c5322d067c65e8578d50c31f24260bb24c7ad | |
parent | 4b78b50b8a0ebeb75a285d0f5c7240bb6bad7ca6 (diff) | |
parent | e24061216228b5ead1ea90e3e9d0d4df8df8b8f4 (diff) | |
download | ATCD-37ce198752139f0886592ff78879d0051736bb9a.tar.gz |
Merge pull request #292 from jwillemsen/master
Use std::abs instead of abs
-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 && |