summaryrefslogtreecommitdiff
path: root/src/core/loader/nro.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-12-02 22:17:09 -0500
committerGravatar Lioncash2018-12-02 23:38:58 -0500
commitfc32d6256adb479e3e990a0f3221d02ef09b1744 (patch)
treea8c52cfc376ea7ea7ddf2e684c3ebb7517fa13eb /src/core/loader/nro.cpp
parentloader/nro: Remove dependency on the System class (diff)
downloadyuzu-fc32d6256adb479e3e990a0f3221d02ef09b1744.tar.gz
yuzu-fc32d6256adb479e3e990a0f3221d02ef09b1744.tar.xz
yuzu-fc32d6256adb479e3e990a0f3221d02ef09b1744.zip
loader/nro: Make the static LoadNro function internally linked
This simply acts as a forwarding function for the Load() function, so this doesn't need to be directly exposed.
Diffstat (limited to 'src/core/loader/nro.cpp')
-rw-r--r--src/core/loader/nro.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp
index 16d5883ee..4fad0c0dd 100644
--- a/src/core/loader/nro.cpp
+++ b/src/core/loader/nro.cpp
@@ -128,8 +128,8 @@ static constexpr u32 PageAlignSize(u32 size) {
128 return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK; 128 return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK;
129} 129}
130 130
131/*static*/ bool AppLoader_NRO::LoadNro(Kernel::Process& process, const std::vector<u8>& data, 131static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data,
132 const std::string& name, VAddr load_base) { 132 const std::string& name, VAddr load_base) {
133 if (data.size() < sizeof(NroHeader)) { 133 if (data.size() < sizeof(NroHeader)) {
134 return {}; 134 return {};
135 } 135 }
@@ -195,8 +195,9 @@ static constexpr u32 PageAlignSize(u32 size) {
195 return true; 195 return true;
196} 196}
197 197
198bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& file, VAddr load_base) { 198bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& file,
199 return LoadNro(process, file.ReadAllBytes(), file.GetName(), load_base); 199 VAddr load_base) {
200 return LoadNroImpl(process, file.ReadAllBytes(), file.GetName(), load_base);
200} 201}
201 202
202ResultStatus AppLoader_NRO::Load(Kernel::Process& process) { 203ResultStatus AppLoader_NRO::Load(Kernel::Process& process) {