diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index 509f8095c9..f600f5edc2 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -511,7 +511,7 @@ void AssetServer::cleanupBakedFilesForDeletedAssets() { std::set bakedHashes; - for (auto it : _fileMappings) { + for (const auto& it : _fileMappings) { // check if this is a mapping to baked content if (it.first.startsWith(AssetUtils::HIDDEN_BAKED_CONTENT_FOLDER)) { // extract the hash from the baked mapping @@ -524,7 +524,7 @@ void AssetServer::cleanupBakedFilesForDeletedAssets() { } // enumerate the hashes for which we have baked content - for (auto hash : bakedHashes) { + for (const auto& hash : bakedHashes) { // check if we have a mapping that points to this hash auto matchingMapping = std::find_if(std::begin(_fileMappings), std::end(_fileMappings), [&hash](const std::pair mappingPair) {