From 5dce8948b65cf9c2d81165056d914b999bb3a4d8 Mon Sep 17 00:00:00 2001 From: Dmitriy Ivanov Date: Tue, 13 Oct 2015 12:14:16 -0700 Subject: [PATCH] Replace auto -> const auto&/auto&& Change-Id: Ie484e5a296b5dd222a9545d8539d40d97a6c158c --- linker/linker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linker/linker.cpp b/linker/linker.cpp index 841b9575f..3c0ccdb77 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -330,7 +330,7 @@ void soinfo::set_dt_runpath(const char* path) { std::string origin = dirname(get_realpath()); // FIXME: add $LIB and $PLATFORM. std::pair substs[] = {{"ORIGIN", origin}}; - for (std::string& s : dt_runpath_) { + for (auto&& s : dt_runpath_) { size_t pos = 0; while (pos < s.size()) { pos = s.find("$", pos); @@ -1161,7 +1161,7 @@ bool ZipArchiveCache::get_or_open(const char* zip_path, ZipArchiveHandle* handle } ZipArchiveCache::~ZipArchiveCache() { - for (auto it : cache_) { + for (const auto& it : cache_) { CloseArchive(it.second); } }