mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
Avoid unnecessary memory allocation/relocation
This commit is contained in:
parent
1f2a6455b6
commit
03d3552ee0
3 changed files with 19 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue