Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUS Cleanup: Removes no longer desired commented code. #1105

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions libultraship/libultraship/ResourceMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,14 @@ namespace Ship {
break;
}

//Lock.lock();
std::shared_ptr<File> 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();
Expand All @@ -117,10 +112,8 @@ namespace Ship {
}

std::shared_ptr<ResourcePromise> ToLoad = nullptr;
//ResLock.lock();
ToLoad = ResourceLoadQueue.front();
ResourceLoadQueue.pop();
//ResLock.unlock();

// Wait for the underlying File to complete loading
{
Expand Down Expand Up @@ -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 {
Expand All @@ -159,9 +149,6 @@ namespace Ship {

SPDLOG_ERROR("Resource load FAILED {} on ResourceMgr thread", ToLoad->file->path);
}

//ResLock.lock();
//ResLock.unlock();
}
}
else
Expand Down