mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-19 03:13:05 +00:00
file_sys/card_image: Deduplicate type cast
Same thing, less duplication. We can also std::move raw into the PartitionFilesystem constructor.
This commit is contained in:
parent
825ffd7b1f
commit
288d027e89
1 changed files with 6 additions and 4 deletions
|
@ -48,10 +48,12 @@ XCI::XCI(VirtualFile file_)
|
||||||
|
|
||||||
for (XCIPartition partition :
|
for (XCIPartition partition :
|
||||||
{XCIPartition::Update, XCIPartition::Normal, XCIPartition::Secure, XCIPartition::Logo}) {
|
{XCIPartition::Update, XCIPartition::Normal, XCIPartition::Secure, XCIPartition::Logo}) {
|
||||||
auto raw = main_hfs.GetFile(partition_names[static_cast<std::size_t>(partition)]);
|
const auto partition_idx = static_cast<std::size_t>(partition);
|
||||||
if (raw != nullptr)
|
auto raw = main_hfs.GetFile(partition_names[partition_idx]);
|
||||||
partitions[static_cast<std::size_t>(partition)] =
|
|
||||||
std::make_shared<PartitionFilesystem>(raw);
|
if (raw != nullptr) {
|
||||||
|
partitions[partition_idx] = std::make_shared<PartitionFilesystem>(std::move(raw));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
secure_partition = std::make_shared<NSP>(
|
secure_partition = std::make_shared<NSP>(
|
||||||
|
|
Loading…
Reference in a new issue