aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Dickens <mlk@alum.mit.edu>2018-12-06 13:16:04 -0500
committerBrent Stapleton <brent.stapleton@ettus.com>2018-12-12 19:23:21 -0800
commit865151108279e1b3cb25d288335d76dc3eef7e4e (patch)
treeeacc01491000adc8cbb84eb5e9072fdefd6aa905
parent7dcdf93cdbe704bf6cc07ec758c708708f1a3277 (diff)
downloaduhd-865151108279e1b3cb25d288335d76dc3eef7e4e.tar.gz
uhd-865151108279e1b3cb25d288335d76dc3eef7e4e.tar.bz2
uhd-865151108279e1b3cb25d288335d76dc3eef7e4e.zip
responder: Better "abs()" compiler compatibility
Use "std::abs" instead of "abs" for better compiler compatibility
-rw-r--r--host/utils/latency/lib/Responder.cpp2
-rw-r--r--host/utils/latency/responder.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/host/utils/latency/lib/Responder.cpp b/host/utils/latency/lib/Responder.cpp
index 8cb1170db..5597c0fcd 100644
--- a/host/utils/latency/lib/Responder.cpp
+++ b/host/utils/latency/lib/Responder.cpp
@@ -855,7 +855,7 @@ Responder::calibrate_usrp_for_test_run()
_stream_cmd.stream_now = true;
_usrp->issue_stream_cmd(_stream_cmd);
- double diff = abs(ave_high - ave_low);
+ double diff = std::abs(ave_high - ave_low);
if (diff < _opt.pulse_detection_threshold)
{
_return_code = RETCODE_BAD_ARGS;
diff --git a/host/utils/latency/responder.cpp b/host/utils/latency/responder.cpp
index 3a94b135f..ebe67f732 100644
--- a/host/utils/latency/responder.cpp
+++ b/host/utils/latency/responder.cpp
@@ -75,7 +75,7 @@ read_program_options(po::variables_map vm)
// read out given options
prog.realtime = (vm.count("no-realtime") == 0);
- prog.delay_step = abs(prog.delay_step);
+ prog.delay_step = std::abs(prog.delay_step);
if (prog.delay_min > prog.delay_max)
{
prog.delay_step *= -1;