diff options
| author | 2019-04-10 03:02:39 -0400 | |
|---|---|---|
| committer | 2019-04-10 15:57:02 -0400 | |
| commit | dae2449880ffe1684d76d9a0ee7a7c0e7a7a21f6 (patch) | |
| tree | 48ae4fe3da4d172cd0aa0300f1d982e2e4d857cf | |
| parent | ldr: Amend parameters for LoadNro/UnloadNro LoadNrr/UnloadNrr (diff) | |
| download | yuzu-dae2449880ffe1684d76d9a0ee7a7c0e7a7a21f6.tar.gz yuzu-dae2449880ffe1684d76d9a0ee7a7c0e7a7a21f6.tar.xz yuzu-dae2449880ffe1684d76d9a0ee7a7c0e7a7a21f6.zip | |
ldr: Mark IsValidNROHash() as a const member function
This doesn't modify instance state, so it can be made const.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index fb8cda858..609102f2c 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp | |||
| @@ -480,11 +480,10 @@ private: | |||
| 480 | std::map<VAddr, NROInfo> nro; | 480 | std::map<VAddr, NROInfo> nro; |
| 481 | std::map<VAddr, std::vector<SHA256Hash>> nrr; | 481 | std::map<VAddr, std::vector<SHA256Hash>> nrr; |
| 482 | 482 | ||
| 483 | bool IsValidNROHash(const SHA256Hash& hash) { | 483 | bool IsValidNROHash(const SHA256Hash& hash) const { |
| 484 | return std::any_of( | 484 | return std::any_of(nrr.begin(), nrr.end(), [&hash](const auto& p) { |
| 485 | nrr.begin(), nrr.end(), [&hash](const std::pair<VAddr, std::vector<SHA256Hash>>& p) { | 485 | return std::find(p.second.begin(), p.second.end(), hash) != p.second.end(); |
| 486 | return std::find(p.second.begin(), p.second.end(), hash) != p.second.end(); | 486 | }); |
| 487 | }); | ||
| 488 | } | 487 | } |
| 489 | 488 | ||
| 490 | static bool IsValidNRO(const NROHeader& header, u64 nro_size, u64 bss_size) { | 489 | static bool IsValidNRO(const NROHeader& header, u64 nro_size, u64 bss_size) { |