Changed for-loop iterator in File.cpp to a reference type to reduce object copying and fix the clang build.
Fixes #2580
This commit is contained in:
parent
0ab0a2f146
commit
ec5c38761f
@ -334,7 +334,7 @@ bool cFile::DeleteFolder(const AString & a_FolderName)
|
|||||||
bool cFile::DeleteFolderContents(const AString & a_FolderName)
|
bool cFile::DeleteFolderContents(const AString & a_FolderName)
|
||||||
{
|
{
|
||||||
auto Contents = cFile::GetFolderContents(a_FolderName);
|
auto Contents = cFile::GetFolderContents(a_FolderName);
|
||||||
for (const auto item: Contents)
|
for (const auto & item: Contents)
|
||||||
{
|
{
|
||||||
// Skip "." and ".." altogether:
|
// Skip "." and ".." altogether:
|
||||||
if ((item == ".") || (item == ".."))
|
if ((item == ".") || (item == ".."))
|
||||||
|
Loading…
Reference in New Issue
Block a user