From f47df4d1a83289043ef40469141aaa03d0c60d35 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Fri, 9 Jul 2021 17:02:06 -0500 Subject: host: Add static_assert to prevent meta_range_t(0,0) meta_range_t(0,0) actually calls the iterator-based constructor for meta_range_t, which is almost certainly not the intended constructor for that call syntax. Therefore, we add a static_assert to prevent such usage, and fix all failing instances. --- host/lib/rfnoc/radio_control_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/rfnoc/radio_control_impl.cpp') diff --git a/host/lib/rfnoc/radio_control_impl.cpp b/host/lib/rfnoc/radio_control_impl.cpp index 0a3eda277..70b17efb3 100644 --- a/host/lib/rfnoc/radio_control_impl.cpp +++ b/host/lib/rfnoc/radio_control_impl.cpp @@ -767,7 +767,7 @@ void radio_control_impl::set_tx_dc_offset(const std::complex&, size_t) uhd::meta_range_t radio_control_impl::get_tx_dc_offset_range(size_t) const { - return uhd::meta_range_t(0, 0); + return uhd::meta_range_t(0.0, 0.0); } void radio_control_impl::set_tx_iq_balance(const std::complex&, size_t) @@ -792,7 +792,7 @@ void radio_control_impl::set_rx_dc_offset(const std::complex&, size_t) uhd::meta_range_t radio_control_impl::get_rx_dc_offset_range(size_t) const { - return uhd::meta_range_t(0, 0); + return uhd::meta_range_t(0.0, 0.0); } void radio_control_impl::set_rx_iq_balance(const bool enb, size_t) -- cgit v1.2.3