summaryrefslogtreecommitdiffstats
path: root/src/core/loader/loader.cpp
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-07-12 00:16:33 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-07-14 01:00:56 +0200
commit2d7299a86fdc4ba2485042f950d864e063be5e97 (patch)
tree26c15a7b8fe0563dc39dd80564c30405d458bfe7 /src/core/loader/loader.cpp
parentFS: Stream RomFS from file instead of loading all of it to memory (diff)
downloadyuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.tar
yuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.tar.gz
yuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.tar.bz2
yuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.tar.lz
yuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.tar.xz
yuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.tar.zst
yuzu-2d7299a86fdc4ba2485042f950d864e063be5e97.zip
Diffstat (limited to '')
-rw-r--r--src/core/loader/loader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index b6549daf2..9ef2f8900 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -90,8 +90,8 @@ static const char* GetFileTypeString(FileType type) {
}
ResultStatus LoadFile(const std::string& filename) {
- std::unique_ptr<FileUtil::IOFile> file(new FileUtil::IOFile(filename, "rb"));
- if (!file->IsOpen()) {
+ FileUtil::IOFile file(filename, "rb");
+ if (!file.IsOpen()) {
LOG_ERROR(Loader, "Failed to load file %s", filename.c_str());
return ResultStatus::Error;
}
@@ -99,7 +99,7 @@ ResultStatus LoadFile(const std::string& filename) {
std::string filename_filename, filename_extension;
Common::SplitPath(filename, nullptr, &filename_filename, &filename_extension);
- FileType type = IdentifyFile(*file);
+ FileType type = IdentifyFile(file);
FileType filename_type = GuessFromExtension(filename_extension);
if (type != filename_type) {