mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 17:00:57 +01:00
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.
This commit is contained in:
parent
b110d2176c
commit
fc32d6256a
2 changed files with 5 additions and 7 deletions
|
@ -128,8 +128,8 @@ static constexpr u32 PageAlignSize(u32 size) {
|
|||
return (size + Memory::PAGE_MASK) & ~Memory::PAGE_MASK;
|
||||
}
|
||||
|
||||
/*static*/ bool AppLoader_NRO::LoadNro(Kernel::Process& process, const std::vector<u8>& data,
|
||||
const std::string& name, VAddr load_base) {
|
||||
static bool LoadNroImpl(Kernel::Process& process, const std::vector<u8>& data,
|
||||
const std::string& name, VAddr load_base) {
|
||||
if (data.size() < sizeof(NroHeader)) {
|
||||
return {};
|
||||
}
|
||||
|
@ -195,8 +195,9 @@ static constexpr u32 PageAlignSize(u32 size) {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& file, VAddr load_base) {
|
||||
return LoadNro(process, file.ReadAllBytes(), file.GetName(), load_base);
|
||||
bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& file,
|
||||
VAddr load_base) {
|
||||
return LoadNroImpl(process, file.ReadAllBytes(), file.GetName(), load_base);
|
||||
}
|
||||
|
||||
ResultStatus AppLoader_NRO::Load(Kernel::Process& process) {
|
||||
|
|
|
@ -45,9 +45,6 @@ public:
|
|||
ResultStatus ReadTitle(std::string& title) override;
|
||||
bool IsRomFSUpdatable() const override;
|
||||
|
||||
static bool LoadNro(Kernel::Process& process, const std::vector<u8>& data,
|
||||
const std::string& name, VAddr load_base);
|
||||
|
||||
private:
|
||||
bool LoadNro(Kernel::Process& process, const FileSys::VfsFile& file, VAddr load_base);
|
||||
|
||||
|
|
Loading…
Reference in a new issue