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:
Lioncash 2019-10-01 22:40:11 -04:00
parent eca34bede5
commit 3383e65761
1 changed files with 2 additions and 2 deletions

View File

@ -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];
if (navigating && hintOpts.GetNextHintIdx() == i)
continue;
@ -1587,7 +1587,7 @@ void CAutoMapper::SetupHintNavigation() {
CAssetId CAutoMapper::GetAreaHintDescriptionString(CAssetId mreaId) {
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];
if (state.x0_state != CHintOptions::EHintState::Displaying)
continue;