diff options
Diffstat (limited to 'src/core/loader')
| -rw-r--r-- | src/core/loader/elf.cpp | 4 | ||||
| -rw-r--r-- | src/core/loader/loader.cpp | 2 | ||||
| -rw-r--r-- | src/core/loader/loader.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index e7e5df408..773eaf771 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp @@ -212,7 +212,7 @@ public: return GetPtr(segments[segment].p_offset); } u32 GetSectionAddr(SectionID section) const { return sectionAddrs[section]; } - int GetSectionSize(SectionID section) const { return sections[section].sh_size; } + unsigned int GetSectionSize(SectionID section) const { return sections[section].sh_size; } SectionID GetSectionByName(const char *name, int firstSection = 0) const; //-1 for not found bool DidRelocate() const { @@ -298,7 +298,7 @@ bool ElfReader::LoadSymbols() { //We have a symbol table! Elf32_Sym* symtab = (Elf32_Sym *)(GetSectionDataPtr(sec)); - int numSymbols = sections[sec].sh_size / sizeof(Elf32_Sym); + unsigned int numSymbols = sections[sec].sh_size / sizeof(Elf32_Sym); for (unsigned sym = 0; sym < numSymbols; sym++) { int size = symtab[sym].st_size; if (size == 0) diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 52730a7b4..94dcc50f9 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp @@ -127,7 +127,7 @@ ResultStatus LoadFile(const std::string& filename) { // Load application and RomFS if (ResultStatus::Success == app_loader.Load()) { Kernel::g_program_id = app_loader.GetProgramId(); - Service::FS::CreateArchive(Common::make_unique<FileSys::Archive_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); + Service::FS::RegisterArchiveType(Common::make_unique<FileSys::ArchiveFactory_RomFS>(app_loader), Service::FS::ArchiveIdCode::RomFS); return ResultStatus::Success; } break; diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index 7456b019b..3510c6b28 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h @@ -38,7 +38,7 @@ enum class ResultStatus { ErrorMemoryAllocationFailed, }; -static u32 MakeMagic(char a, char b, char c, char d) { +static inline u32 MakeMagic(char a, char b, char c, char d) { return a | b << 8 | c << 16 | d << 24; } |
