mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
pass delete paths by reference for trimming
This commit is contained in:
parent
6ae5ed6588
commit
6f550292f4
2 changed files with 3 additions and 3 deletions
|
@ -551,12 +551,12 @@ bool pathIsFolder(const AssetPath& path) {
|
|||
return path.endsWith('/');
|
||||
}
|
||||
|
||||
bool AssetServer::deleteMappings(const AssetPathList& paths) {
|
||||
bool AssetServer::deleteMappings(AssetPathList& paths) {
|
||||
// take a copy of the current mappings in case persistence of these deletes fails
|
||||
auto oldMappings = _fileMappings;
|
||||
|
||||
// enumerate the paths to delete and remove them all
|
||||
for (auto path : paths) {
|
||||
for (auto& path : paths) {
|
||||
|
||||
path = path.trimmed();
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ private:
|
|||
bool setMapping(AssetPath path, AssetHash hash);
|
||||
|
||||
/// Delete mapping `path`. Returns `true` if deletion of mappings succeeds, else `false`.
|
||||
bool deleteMappings(const AssetPathList& paths);
|
||||
bool deleteMappings(AssetPathList& paths);
|
||||
|
||||
/// Rename mapping from `oldPath` to `newPath`. Returns true if successful
|
||||
bool renameMapping(AssetPath oldPath, AssetPath newPath);
|
||||
|
|
Loading…
Reference in a new issue