diff options
author | Lane Kolbly <lane.kolbly@ni.com> | 2021-07-09 17:02:06 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-07-14 16:19:20 -0500 |
commit | f47df4d1a83289043ef40469141aaa03d0c60d35 (patch) | |
tree | ba7a251348ebce47b2c1df44e40c8ffb200fc3a5 /host/lib/usrp/x300/x300_radio_control.cpp | |
parent | 14ea574bb7e1a8e6dc1d8d8935cd527b2947009c (diff) | |
download | uhd-f47df4d1a83289043ef40469141aaa03d0c60d35.tar.gz uhd-f47df4d1a83289043ef40469141aaa03d0c60d35.tar.bz2 uhd-f47df4d1a83289043ef40469141aaa03d0c60d35.zip |
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.
Diffstat (limited to 'host/lib/usrp/x300/x300_radio_control.cpp')
-rw-r--r-- | host/lib/usrp/x300/x300_radio_control.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |