From 0d9c3905261afb82520b723a9fd37a00cfcfb9cc Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Mon, 8 Aug 2022 21:53:36 -0400 Subject: [PATCH] Removes no longer desired commented code. (#1105) --- libultraship/libultraship/ResourceMgr.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/libultraship/libultraship/ResourceMgr.cpp b/libultraship/libultraship/ResourceMgr.cpp index bcc7839938e..4c517b39db7 100644 --- a/libultraship/libultraship/ResourceMgr.cpp +++ b/libultraship/libultraship/ResourceMgr.cpp @@ -82,19 +82,14 @@ namespace Ship { break; } - //Lock.lock(); std::shared_ptr ToLoad = FileLoadQueue.front(); FileLoadQueue.pop(); - //Lock.unlock(); OTR->LoadFile(ToLoad->path, true, ToLoad); - //Lock.lock(); if (!ToLoad->bHasLoadError) FileCache[ToLoad->path] = ToLoad->bIsLoaded && !ToLoad->bHasLoadError ? ToLoad : nullptr; - //Lock.unlock(); - SPDLOG_DEBUG("Loaded File {} on ResourceMgr thread", ToLoad->path); ToLoad->FileLoadNotifier.notify_all(); @@ -117,10 +112,8 @@ namespace Ship { } std::shared_ptr ToLoad = nullptr; - //ResLock.lock(); ToLoad = ResourceLoadQueue.front(); ResourceLoadQueue.pop(); - //ResLock.unlock(); // Wait for the underlying File to complete loading { @@ -148,9 +141,6 @@ namespace Ship { SPDLOG_DEBUG("Loaded Resource {} on ResourceMgr thread", ToLoad->file->path); - // Disabled for now because it can cause random crashes - //FileCache[Res->File->path] = nullptr; - //FileCache.erase(FileCache.find(Res->File->path)); Res->file = nullptr; } else { @@ -159,9 +149,6 @@ namespace Ship { SPDLOG_ERROR("Resource load FAILED {} on ResourceMgr thread", ToLoad->file->path); } - - //ResLock.lock(); - //ResLock.unlock(); } } else