aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-07-20 15:23:32 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2021-07-23 09:55:49 -0500
commit5683b30c8f62a0dc176cefbab25b56760363e878 (patch)
tree598b3d630e33251fdaead3d4069ceb11c0aad44d /host/lib/usrp/cores
parent0d9667e6968dd1e6edda62693ab6a858849d3a08 (diff)
downloaduhd-5683b30c8f62a0dc176cefbab25b56760363e878.tar.gz
uhd-5683b30c8f62a0dc176cefbab25b56760363e878.tar.bz2
uhd-5683b30c8f62a0dc176cefbab25b56760363e878.zip
uhd: Fix usage of std::abs with template parameters
`std::abs` is only a templated function, when dealing with complex numbers. For real values, it is an overload. There is no documented standard way to use `std::abs<double>()` for real-valued arguments. We therefore remove all usages of `std::abs<>()` and replace them with `std::abs()` where they were taking a real-valued argument.
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index 1c15180ae..2c6aad014 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -260,7 +260,7 @@ public:
uhd::meta_range_t get_freq_range(void) override
{
// Too keep the DSP range symmetric about 0, we use abs(_dsp_freq_offset)
- const double offset = std::abs<double>(_dsp_freq_offset);
+ const double offset = std::abs(_dsp_freq_offset);
return uhd::meta_range_t(-(_tick_rate - offset) / 2,
+(_tick_rate - offset) / 2,
_tick_rate / std::pow(2.0, 32));