diff options
author | Lioncash <mathew1800@gmail.com> | 2020-10-13 14:10:50 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-10-13 19:16:49 +0200 |
commit | 39c8d18feba8eafcd43fbb55e73ae150a1947aad (patch) | |
tree | 9565ff464bbb9e5a0aa66e6e310098314e88d019 /src/core/loader | |
parent | Merge pull request #3929 from FearlessTobi/ticket-keys (diff) | |
download | yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.gz yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.bz2 yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.lz yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.xz yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.tar.zst yuzu-39c8d18feba8eafcd43fbb55e73ae150a1947aad.zip |
Diffstat (limited to 'src/core/loader')
-rw-r--r-- | src/core/loader/kip.cpp | 2 | ||||
-rw-r--r-- | src/core/loader/nro.cpp | 2 | ||||
-rw-r--r-- | src/core/loader/nso.cpp | 2 | ||||
-rw-r--r-- | src/core/loader/nso.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/core/loader/kip.cpp b/src/core/loader/kip.cpp index 5981bcd21..2a905d3e4 100644 --- a/src/core/loader/kip.cpp +++ b/src/core/loader/kip.cpp @@ -16,7 +16,7 @@ namespace Loader { namespace { constexpr u32 PageAlignSize(u32 size) { - return (size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK; + return static_cast<u32>((size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK); } } // Anonymous namespace diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 9fb5eddad..5f4b3104b 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -127,7 +127,7 @@ FileType AppLoader_NRO::IdentifyType(const FileSys::VirtualFile& file) { } static constexpr u32 PageAlignSize(u32 size) { - return (size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK; + return static_cast<u32>((size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK); } static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data, diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index 1e70f6e11..497f438a1 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp @@ -47,7 +47,7 @@ std::vector<u8> DecompressSegment(const std::vector<u8>& compressed_data, } constexpr u32 PageAlignSize(u32 size) { - return (size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK; + return static_cast<u32>((size + Core::Memory::PAGE_MASK) & ~Core::Memory::PAGE_MASK); } } // Anonymous namespace diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index 4bd47787d..d331096ae 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h @@ -59,7 +59,7 @@ struct NSOHeader { static_assert(sizeof(NSOHeader) == 0x100, "NSOHeader has incorrect size."); static_assert(std::is_trivially_copyable_v<NSOHeader>, "NSOHeader must be trivially copyable."); -constexpr u64 NSO_ARGUMENT_DATA_ALLOCATION_SIZE = 0x9000; +constexpr u32 NSO_ARGUMENT_DATA_ALLOCATION_SIZE = 0x9000; struct NSOArgumentHeader { u32_le allocated_size; |