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/usrp/multi_usrp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/multi_usrp.cpp') diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 721b57ec9..89c4cbc26 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -1847,7 +1847,7 @@ public: } else { UHD_LOGGER_WARNING("MULTI_USRP") << "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); } } @@ -2340,7 +2340,7 @@ public: } else { UHD_LOGGER_WARNING("MULTI_USRP") << "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); } } -- cgit v1.2.3