mirror of https://github.com/AxioDL/metaforce.git
CAutoMapper: Use size_t instead of u32 as loop variable type where applicable
Uses the same sized type as the .size() call to prevent potential overflow false-positives.
This commit is contained in:
parent
eca34bede5
commit
3383e65761
|
@ -1573,7 +1573,7 @@ void CAutoMapper::SetupHintNavigation() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (u32 i = 0; i < hintOpts.GetHintStates().size(); ++i) {
|
for (size_t i = 0; i < hintOpts.GetHintStates().size(); ++i) {
|
||||||
const CHintOptions::SHintState& state = hintOpts.GetHintStates()[i];
|
const CHintOptions::SHintState& state = hintOpts.GetHintStates()[i];
|
||||||
if (navigating && hintOpts.GetNextHintIdx() == i)
|
if (navigating && hintOpts.GetNextHintIdx() == i)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1587,7 +1587,7 @@ void CAutoMapper::SetupHintNavigation() {
|
||||||
|
|
||||||
CAssetId CAutoMapper::GetAreaHintDescriptionString(CAssetId mreaId) {
|
CAssetId CAutoMapper::GetAreaHintDescriptionString(CAssetId mreaId) {
|
||||||
const CHintOptions& hintOpts = g_GameState->HintOptions();
|
const CHintOptions& hintOpts = g_GameState->HintOptions();
|
||||||
for (u32 i = 0; i < hintOpts.GetHintStates().size(); ++i) {
|
for (size_t i = 0; i < hintOpts.GetHintStates().size(); ++i) {
|
||||||
const CHintOptions::SHintState& state = hintOpts.GetHintStates()[i];
|
const CHintOptions::SHintState& state = hintOpts.GetHintStates()[i];
|
||||||
if (state.x0_state != CHintOptions::EHintState::Displaying)
|
if (state.x0_state != CHintOptions::EHintState::Displaying)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue