Avoid unnecessary memory allocation/relocation

This commit is contained in:
Chocobo1 2023-06-21 12:46:15 +08:00
parent 1f2a6455b6
commit 03d3552ee0
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
3 changed files with 19 additions and 4 deletions

View file

@ -318,7 +318,7 @@ void Path::stripRootFolder(PathList &filePaths)
return;
for (Path &filePath : filePaths)
filePath.m_pathStr = filePath.m_pathStr.mid(commonRootFolder.m_pathStr.size() + 1);
filePath.m_pathStr.remove(0, (commonRootFolder.m_pathStr.size() + 1));
}
void Path::addRootFolder(PathList &filePaths, const Path &rootFolder)