diff options
| author | 2018-11-19 08:12:22 -0500 | |
|---|---|---|
| committer | 2018-11-19 08:12:25 -0500 | |
| commit | 43e7c6cf49ebffef76df4771c822539062fae6a4 (patch) | |
| tree | 5e31e744f4e02bd710a3fb11e0ef01fef99904c6 | |
| parent | Merge pull request #1717 from FreddyFunk/swizzle-gob (diff) | |
| download | yuzu-43e7c6cf49ebffef76df4771c822539062fae6a4.tar.gz yuzu-43e7c6cf49ebffef76df4771c822539062fae6a4.tar.xz yuzu-43e7c6cf49ebffef76df4771c822539062fae6a4.zip | |
ldr: Clean up error codes
The separate enum isn't particularly necessary here, and the values can
just be directly put into the ResultCode instances, given the names are
also self-documenting here.
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index b43f1f054..7a9d0d0dd 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -16,35 +16,18 @@ | |||
| 16 | 16 | ||
| 17 | namespace Service::LDR { | 17 | namespace Service::LDR { |
| 18 | 18 | ||
| 19 | namespace ErrCodes { | 19 | constexpr ResultCode ERROR_INVALID_MEMORY_STATE{ErrorModule::Loader, 51}; |
| 20 | enum { | 20 | constexpr ResultCode ERROR_INVALID_NRO{ErrorModule::Loader, 52}; |
| 21 | InvalidMemoryState = 51, | 21 | constexpr ResultCode ERROR_INVALID_NRR{ErrorModule::Loader, 53}; |
| 22 | InvalidNRO = 52, | 22 | constexpr ResultCode ERROR_MISSING_NRR_HASH{ErrorModule::Loader, 54}; |
| 23 | InvalidNRR = 53, | 23 | constexpr ResultCode ERROR_MAXIMUM_NRO{ErrorModule::Loader, 55}; |
| 24 | MissingNRRHash = 54, | 24 | constexpr ResultCode ERROR_MAXIMUM_NRR{ErrorModule::Loader, 56}; |
| 25 | MaximumNRO = 55, | 25 | constexpr ResultCode ERROR_ALREADY_LOADED{ErrorModule::Loader, 57}; |
| 26 | MaximumNRR = 56, | 26 | constexpr ResultCode ERROR_INVALID_ALIGNMENT{ErrorModule::Loader, 81}; |
| 27 | AlreadyLoaded = 57, | 27 | constexpr ResultCode ERROR_INVALID_SIZE{ErrorModule::Loader, 82}; |
| 28 | InvalidAlignment = 81, | 28 | constexpr ResultCode ERROR_INVALID_NRO_ADDRESS{ErrorModule::Loader, 84}; |
| 29 | InvalidSize = 82, | 29 | constexpr ResultCode ERROR_INVALID_NRR_ADDRESS{ErrorModule::Loader, 85}; |
| 30 | InvalidNROAddress = 84, | 30 | constexpr ResultCode ERROR_NOT_INITIALIZED{ErrorModule::Loader, 87}; |
| 31 | InvalidNRRAddress = 85, | ||
| 32 | NotInitialized = 87, | ||
| 33 | }; | ||
| 34 | } | ||
| 35 | |||
| 36 | constexpr ResultCode ERROR_INVALID_MEMORY_STATE(ErrorModule::Loader, ErrCodes::InvalidMemoryState); | ||
| 37 | constexpr ResultCode ERROR_INVALID_NRO(ErrorModule::Loader, ErrCodes::InvalidNRO); | ||
| 38 | constexpr ResultCode ERROR_INVALID_NRR(ErrorModule::Loader, ErrCodes::InvalidNRR); | ||
| 39 | constexpr ResultCode ERROR_MISSING_NRR_HASH(ErrorModule::Loader, ErrCodes::MissingNRRHash); | ||
| 40 | constexpr ResultCode ERROR_MAXIMUM_NRO(ErrorModule::Loader, ErrCodes::MaximumNRO); | ||
| 41 | constexpr ResultCode ERROR_MAXIMUM_NRR(ErrorModule::Loader, ErrCodes::MaximumNRR); | ||
| 42 | constexpr ResultCode ERROR_ALREADY_LOADED(ErrorModule::Loader, ErrCodes::AlreadyLoaded); | ||
| 43 | constexpr ResultCode ERROR_INVALID_ALIGNMENT(ErrorModule::Loader, ErrCodes::InvalidAlignment); | ||
| 44 | constexpr ResultCode ERROR_INVALID_SIZE(ErrorModule::Loader, ErrCodes::InvalidSize); | ||
| 45 | constexpr ResultCode ERROR_INVALID_NRO_ADDRESS(ErrorModule::Loader, ErrCodes::InvalidNROAddress); | ||
| 46 | constexpr ResultCode ERROR_INVALID_NRR_ADDRESS(ErrorModule::Loader, ErrCodes::InvalidNRRAddress); | ||
| 47 | constexpr ResultCode ERROR_NOT_INITIALIZED(ErrorModule::Loader, ErrCodes::NotInitialized); | ||
| 48 | 31 | ||
| 49 | constexpr u64 MAXIMUM_LOADED_RO = 0x40; | 32 | constexpr u64 MAXIMUM_LOADED_RO = 0x40; |
| 50 | 33 | ||