Skip to content

Commit

Permalink
DiscIO: cleanup warnings of -Wmaybe-uninitialized
Browse files Browse the repository at this point in the history
replace {} with std::nullopt.
  • Loading branch information
howard0su committed Mar 23, 2020
1 parent 6270798 commit d44c51b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/DiscIO/DiscExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ std::optional<u64> GetBootDOLOffset(const Volume& volume, const Partition& parti
{
const Platform volume_type = volume.GetVolumeType();
if (!IsDisc(volume_type))
return {};
return std::nullopt;

std::optional<u64> dol_offset = volume.ReadSwappedAndShifted(0x420, partition);

Expand All @@ -280,7 +280,7 @@ std::optional<u64> GetBootDOLOffset(const Volume& volume, const Partition& parti
std::optional<u32> GetBootDOLSize(const Volume& volume, const Partition& partition, u64 dol_offset)
{
if (!IsDisc(volume.GetVolumeType()))
return {};
return std::nullopt;

u32 dol_size = 0;

Expand Down Expand Up @@ -326,7 +326,7 @@ std::optional<u64> GetFSTOffset(const Volume& volume, const Partition& partition
{
const Platform volume_type = volume.GetVolumeType();
if (!IsDisc(volume_type))
return {};
return std::nullopt;

return volume.ReadSwappedAndShifted(0x424, partition);
}
Expand All @@ -335,7 +335,7 @@ std::optional<u64> GetFSTSize(const Volume& volume, const Partition& partition)
{
const Platform volume_type = volume.GetVolumeType();
if (!IsDisc(volume_type))
return {};
return std::nullopt;

return volume.ReadSwappedAndShifted(0x428, partition);
}
Expand Down

0 comments on commit d44c51b

Please sign in to comment.