diff options
| author | 2021-04-27 12:05:34 -0400 | |
|---|---|---|
| committer | 2021-04-27 12:48:15 -0400 | |
| commit | 724c19a307f31ce1122fb8047c86d5a126d0860f (patch) | |
| tree | 605b89f42d7897aac46f06add54c34201d9354bd /src/core/loader/nso.h | |
| parent | Merge pull request #6246 from lioncash/shadow (diff) | |
| download | yuzu-724c19a307f31ce1122fb8047c86d5a126d0860f.tar.gz yuzu-724c19a307f31ce1122fb8047c86d5a126d0860f.tar.xz yuzu-724c19a307f31ce1122fb8047c86d5a126d0860f.zip | |
loader: Resolve instances of variable shadowing
Eliminates variable shadowing cases across all the loaders to bring us
closer to enabling variable shadowing as an error in core.
Diffstat (limited to 'src/core/loader/nso.h')
| -rw-r--r-- | src/core/loader/nso.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/loader/nso.h b/src/core/loader/nso.h index 3af461b5f..195149b55 100644 --- a/src/core/loader/nso.h +++ b/src/core/loader/nso.h | |||
| @@ -71,27 +71,29 @@ static_assert(sizeof(NSOArgumentHeader) == 0x20, "NSOArgumentHeader has incorrec | |||
| 71 | /// Loads an NSO file | 71 | /// Loads an NSO file |
| 72 | class AppLoader_NSO final : public AppLoader { | 72 | class AppLoader_NSO final : public AppLoader { |
| 73 | public: | 73 | public: |
| 74 | explicit AppLoader_NSO(FileSys::VirtualFile file); | 74 | explicit AppLoader_NSO(FileSys::VirtualFile file_); |
| 75 | 75 | ||
| 76 | /** | 76 | /** |
| 77 | * Returns the type of the file | 77 | * Identifies whether or not the given file is a form of NSO file. |
| 78 | * @param file open file | 78 | * |
| 79 | * @return FileType found, or FileType::Error if this loader doesn't know it | 79 | * @param in_file The file to be identified. |
| 80 | * | ||
| 81 | * @return FileType::NSO if found, or FileType::Error if some other type of file. | ||
| 80 | */ | 82 | */ |
| 81 | static FileType IdentifyType(const FileSys::VirtualFile& file); | 83 | static FileType IdentifyType(const FileSys::VirtualFile& in_file); |
| 82 | 84 | ||
| 83 | FileType GetFileType() const override { | 85 | FileType GetFileType() const override { |
| 84 | return IdentifyType(file); | 86 | return IdentifyType(file); |
| 85 | } | 87 | } |
| 86 | 88 | ||
| 87 | static std::optional<VAddr> LoadModule(Kernel::Process& process, Core::System& system, | 89 | static std::optional<VAddr> LoadModule(Kernel::Process& process, Core::System& system, |
| 88 | const FileSys::VfsFile& file, VAddr load_base, | 90 | const FileSys::VfsFile& nso_file, VAddr load_base, |
| 89 | bool should_pass_arguments, bool load_into_process, | 91 | bool should_pass_arguments, bool load_into_process, |
| 90 | std::optional<FileSys::PatchManager> pm = {}); | 92 | std::optional<FileSys::PatchManager> pm = {}); |
| 91 | 93 | ||
| 92 | LoadResult Load(Kernel::Process& process, Core::System& system) override; | 94 | LoadResult Load(Kernel::Process& process, Core::System& system) override; |
| 93 | 95 | ||
| 94 | ResultStatus ReadNSOModules(Modules& modules) override; | 96 | ResultStatus ReadNSOModules(Modules& out_modules) override; |
| 95 | 97 | ||
| 96 | private: | 98 | private: |
| 97 | Modules modules; | 99 | Modules modules; |