Merge "Fix performance-for-range-copy warnings"
diff --git a/modules/input/evdev/InputHub.cpp b/modules/input/evdev/InputHub.cpp
index af7b28e..d22fc88 100644
--- a/modules/input/evdev/InputHub.cpp
+++ b/modules/input/evdev/InputHub.cpp
@@ -495,7 +495,7 @@
 
 status_t InputHub::unregisterDevicePath(const std::string& path) {
     int wd = -1;
-    for (auto pair : mWatchedPaths) {
+    for (const auto& pair : mWatchedPaths) {
         if (pair.second == path) {
             wd = pair.first;
             break;
@@ -781,7 +781,7 @@
 }
 
 status_t InputHub::closeNode(const InputDeviceNode* node) {
-    for (auto pair : mDeviceNodes) {
+    for (const auto& pair : mDeviceNodes) {
         if (pair.second.get() == node) {
             return closeNodeByFd(pair.first);
         }
@@ -801,7 +801,7 @@
 }
 
 std::shared_ptr<InputDeviceNode> InputHub::findNodeByPath(const std::string& path) {
-    for (auto pair : mDeviceNodes) {
+    for (const auto& pair : mDeviceNodes) {
         if (pair.second->getPath() == path) return pair.second;
     }
     return nullptr;