summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/Blob.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-06-09 12:56:36 +0200
committerJosJuice <josjuice@gmail.com>2017-08-01 11:36:40 +0200
commit251828ccc0d449ff9da1c823c7fb5aee6c4ace73 (patch)
treee3e855e394c6d52ec920c675e6631c48526afe56 /Source/Core/DiscIO/Blob.cpp
parenta6bbf7e21b7ae1c0d11feb3acb88875b7b6e30ca (diff)
Don't check validity twice when creating DirectoryBlob
Diffstat (limited to 'Source/Core/DiscIO/Blob.cpp')
-rw-r--r--Source/Core/DiscIO/Blob.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/DiscIO/Blob.cpp b/Source/Core/DiscIO/Blob.cpp
index 7f4eeccb1c..5e603610b2 100644
--- a/Source/Core/DiscIO/Blob.cpp
+++ b/Source/Core/DiscIO/Blob.cpp
@@ -203,8 +203,8 @@ std::unique_ptr<BlobReader> CreateBlobReader(const std::string& filename)
case WBFS_MAGIC:
return WbfsFileReader::Create(std::move(file), filename);
default:
- if (DirectoryBlobReader::IsValidDirectoryBlob(filename))
- return DirectoryBlobReader::Create(filename);
+ if (auto directory_blob = DirectoryBlobReader::Create(filename))
+ return std::move(directory_blob);
return PlainFileReader::Create(std::move(file));
}