From 47623aabb4832d3d217faa1a9938bb7a6e4341c3 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 8 Jan 2021 13:23:17 +0100 Subject: 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. --- host/lib/usrp/x300/x300_radio_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 893a99942..36813d044 100644 --- a/host/lib/usrp/x300/x300_radio_control.cpp +++ b/host/lib/usrp/x300/x300_radio_control.cpp @@ -159,7 +159,7 @@ public: // TODO: Do we need this section? Since the _fp_gpio handles state now, we // don't need to stash values here. We only need this if we want to set // anything to a default value. - for (const gpio_atr::gpio_attr_map_t::value_type attr : gpio_atr::gpio_attr_map) { + for (const auto& attr : gpio_atr::gpio_attr_map) { // TODO: Default values? if (attr.first == usrp::gpio_atr::GPIO_SRC) { // Don't set the SRC -- cgit v1.2.3