diff options
author | Lioncash <mathew1800@gmail.com> | 2020-09-22 17:31:53 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-09-22 17:32:33 -0400 |
commit | ff45c3957858cdf189b73e11550da06fe4337b8e (patch) | |
tree | 288ff1cc4677d6511ed8cc7e1b0db20ce2d2590f /src/core/loader | |
parent | c07fd2898b45032b5e4084fc49a19018ad099ba6 (diff) |
General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.
This also makes it consistent how we return empty optionals.
Diffstat (limited to 'src/core/loader')
-rw-r--r-- | src/core/loader/nso.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 60373cc5f..1e70f6e11 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -76,16 +76,16 @@ std::optional<VAddr> AppLoader_NSO::LoadModule(Kernel::Process& process, Core::S bool should_pass_arguments, bool load_into_process, std::optional<FileSys::PatchManager> pm) { if (file.GetSize() < sizeof(NSOHeader)) { - return {}; + return std::nullopt; } NSOHeader nso_header{}; if (sizeof(NSOHeader) != file.ReadObject(&nso_header)) { - return {}; + return std::nullopt; } if (nso_header.magic != Common::MakeMagic('N', 'S', 'O', '0')) { - return {}; + return std::nullopt; } // Build program image |