Skip to content

Commit 40fc3a6

Browse files
committed
remove unused stuff and fix merge problem
1 parent cc88286 commit 40fc3a6

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

src/resource/ResourceManager.cpp

-12
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,6 @@ std::shared_ptr<IResource> ResourceManager::LoadResourceProcess(const std::strin
136136
return resource;
137137
}
138138

139-
std::shared_future<std::shared_ptr<File>> ResourceManager::LoadFileAsync(const std::string& filePath, bool priority) {
140-
if (priority) {
141-
return mThreadPool->submit_front(&ResourceManager::LoadFileProcess, this, filePath).share();
142-
} else {
143-
return mThreadPool->submit_back(&ResourceManager::LoadFileProcess, this, filePath).share();
144-
}
145-
}
146-
147-
std::shared_ptr<File> ResourceManager::LoadFile(const std::string& filePath) {
148-
return LoadFileAsync(filePath, true).get();
149-
}
150-
151139
std::shared_future<std::shared_ptr<IResource>> ResourceManager::LoadResourceAsync(const std::string& filePath,
152140
bool loadExact, bool priority, std::shared_ptr<ResourceInitData> initData) {
153141
// Check for and remove the OTR signature

src/resource/ResourceManager.h

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class ResourceManager {
2929
bool DidLoadSuccessfully();
3030
std::shared_ptr<ArchiveManager> GetArchiveManager();
3131
std::shared_ptr<ResourceLoader> GetResourceLoader();
32-
std::shared_future<std::shared_ptr<File>> LoadFileAsync(const std::string& filePath, bool priority = false);
33-
std::shared_ptr<File> LoadFile(const std::string& filePath);
3432
std::shared_ptr<IResource> GetCachedResource(const std::string& filePath, bool loadExact = false);
3533
std::shared_ptr<IResource> LoadResource(const std::string& filePath, bool loadExact = false, std::shared_ptr<ResourceInitData> initData = nullptr);
3634
std::shared_ptr<IResource> LoadResourceProcess(const std::string& filePath, bool loadExact = false, std::shared_ptr<ResourceInitData> initData = nullptr);

src/resource/archive/ArchiveManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ bool ArchiveManager::IsArchiveLoaded() {
4040
return !mArchives.empty();
4141
}
4242

43-
std::shared_ptr<File> ArchiveManager::LoadFile(const std::string& filePath) {
43+
std::shared_ptr<File> ArchiveManager::LoadFile(const std::string& filePath, std::shared_ptr<ResourceInitData> initData) {
4444
if (filePath == "") {
4545
return nullptr;
4646
}
4747

4848
return LoadFile(CRC64(filePath.c_str()), initData);
4949
}
5050

51-
std::shared_ptr<File> ArchiveManager::LoadFile(uint64_t hash) {
51+
std::shared_ptr<File> ArchiveManager::LoadFile(uint64_t hash, std::shared_ptr<ResourceInitData> initData) {
5252
const auto archive = mFileToArchive[hash];
5353
if (archive == nullptr) {
5454
return nullptr;

0 commit comments

Comments
 (0)