From ec5c38761f69ed34f77c82fb8fc3367b4d1871d0 Mon Sep 17 00:00:00 2001 From: bibo38 Date: Fri, 30 Oct 2015 20:09:39 +0100 Subject: Changed for-loop iterator in File.cpp to a reference type to reduce object copying and fix the clang build. Fixes #2580 --- src/OSSupport/File.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index dec873ccd..0511c6083 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -334,7 +334,7 @@ bool cFile::DeleteFolder(const AString & a_FolderName) bool cFile::DeleteFolderContents(const AString & a_FolderName) { auto Contents = cFile::GetFolderContents(a_FolderName); - for (const auto item: Contents) + for (const auto & item: Contents) { // Skip "." and ".." altogether: if ((item == ".") || (item == "..")) -- cgit v1.2.3