From f47df4d1a83289043ef40469141aaa03d0c60d35 Mon Sep 17 00:00:00 2001 From: Lane Kolbly <lane.kolbly@ni.com> 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/usrp/x300/x300_radio_control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/x300') diff --git a/host/lib/usrp/x300/x300_radio_control.cpp b/host/lib/usrp/x300/x300_radio_control.cpp index 73006a7c8..54f03fc6c 100644 --- a/host/lib/usrp/x300/x300_radio_control.cpp +++ b/host/lib/usrp/x300/x300_radio_control.cpp @@ -821,7 +821,7 @@ public: } else { RFNOC_LOG_WARNING( "This device does not support querying the TX DC offset range."); - return meta_range_t(0, 0); + return meta_range_t(0.0, 0.0); } } @@ -864,7 +864,7 @@ public: } else { RFNOC_LOG_WARNING( "This device does not support querying the rx DC offset range."); - return meta_range_t(0, 0); + return meta_range_t(0.0, 0.0); } } -- cgit v1.2.3