From 47623aabb4832d3d217faa1a9938bb7a6e4341c3 Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
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/cores/gpio_atr_3000.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'host/lib/usrp/cores')

diff --git a/host/lib/usrp/cores/gpio_atr_3000.cpp b/host/lib/usrp/cores/gpio_atr_3000.cpp
index 875752ee2..0c7eeebda 100644
--- a/host/lib/usrp/cores/gpio_atr_3000.cpp
+++ b/host/lib/usrp/cores/gpio_atr_3000.cpp
@@ -54,7 +54,7 @@ public:
         _atr_fdx_reg.initialize(*_iface, true);
         _ddr_reg.initialize(*_iface, true);
         _atr_disable_reg.initialize(*_iface, true);
-        for (const gpio_attr_map_t::value_type attr : gpio_attr_map) {
+        for (const auto& attr : gpio_attr_map) {
             if (attr.first == usrp::gpio_atr::GPIO_SRC
                 || attr.first == usrp::gpio_atr::GPIO_READBACK) {
                 // Don't set the SRC and READBACK, they're handled elsewhere.
-- 
cgit v1.2.3