2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:47:43 +00:00

General: Mark a handful of deduced const variables as const explicitly

Same behavior, but makes it explicit to the reader that these are const.

Prevents cases where the reader might assume that just because the
variable isn't const qualified that it must be mutable, when it actually
isn't.
This commit is contained in:
Lioncash
2020-05-08 18:41:27 -04:00
parent 6658be66c2
commit 5d209c8dc8
12 changed files with 47 additions and 35 deletions

View File

@@ -1267,7 +1267,7 @@ static CAssetId UpdatePersistentScanPercent(u32 prevLogScans, u32 logScans, u32
if (scanPercentProgStep > prevScanPercentProgStep) {
const char* const messageResBase = UnlockMessageResBases[zeus::clamp(0, scanPercentProgStep - 1, 1)];
const auto message = std::string(messageResBase).append(1, firstTime ? '1' : '2');
const auto id = g_ResFactory->GetResourceIdByName(message);
const auto* const id = g_ResFactory->GetResourceIdByName(message);
if (id != nullptr) {
return id->id;
}