mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Avoid unnecessary memory allocation/relocation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user