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/b200/b200_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp/b200') diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 1205843ae..65d009e61 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -750,7 +750,7 @@ b200_impl::b200_impl( //////////////////////////////////////////////////////////////////// _radio_perifs[0].fp_gpio = gpio_atr_3000::make(_radio_perifs[0].ctrl, TOREG(SR_FP_GPIO), RB32_FP_GPIO); - for (const gpio_attr_map_t::value_type attr : gpio_attr_map) { + for (const auto& attr : gpio_attr_map) { switch (attr.first) { case usrp::gpio_atr::GPIO_SRC: _tree -- cgit v1.2.3