diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-01-08 13:23:17 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-04 08:24:09 -0600 |
commit | 47623aabb4832d3d217faa1a9938bb7a6e4341c3 (patch) | |
tree | b67dec95e65ca8aacd4352413506c8869480e450 /host/lib/usrp/dboard/db_tvrx.cpp | |
parent | 49e5ef81530684998bc4bc0934590cdaa81190ab (diff) | |
download | uhd-47623aabb4832d3d217faa1a9938bb7a6e4341c3.tar.gz uhd-47623aabb4832d3d217faa1a9938bb7a6e4341c3.tar.bz2 uhd-47623aabb4832d3d217faa1a9938bb7a6e4341c3.zip |
lib: Use const-ref in for loops instead of const-copy
This is potentially a performance issue, even though it doesn't have
a big impact in this context. Clang will warn about it, and this fixes
the compiler warning.
Diffstat (limited to 'host/lib/usrp/dboard/db_tvrx.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_tvrx.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp index 02fed018c..c9a940d15 100644 --- a/host/lib/usrp/dboard/db_tvrx.cpp +++ b/host/lib/usrp/dboard/db_tvrx.cpp @@ -158,7 +158,7 @@ static const boost::array<double, 17> tvrx_gains_volts = {{0.8, static uhd::dict<std::string, gain_range_t> get_tvrx_gain_ranges(void) { double rfmax = 0.0, rfmin = FLT_MAX; - for (const std::string range : tvrx_rf_gains_db.keys()) { + for (const std::string& range : tvrx_rf_gains_db.keys()) { double my_max = tvrx_rf_gains_db[range].back(); // we're assuming it's monotonic double my_min = tvrx_rf_gains_db[range].front(); // if it's not this is wrong wrong wrong |