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/utils | |
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/utils')
-rw-r--r-- | host/utils/uhd_usrp_probe.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp index 50eabc55b..7a6b6eb14 100644 --- a/host/utils/uhd_usrp_probe.cpp +++ b/host/utils/uhd_usrp_probe.cpp @@ -193,8 +193,8 @@ static std::string get_rfnoc_blocks_pp_string(rfnoc::rfnoc_graph::sptr graph) { std::stringstream ss; ss << "RFNoC blocks on this device:" << std::endl << std::endl; - for (const std::string& name : graph->find_blocks("")) { - ss << "* " << name << std::endl; + for (const auto& name : graph->find_blocks("")) { + ss << "* " << name.to_string() << std::endl; } return ss.str(); } |