Fix signed/unsigned comparison warning

This commit is contained in:
Dale Glass 2022-06-05 13:21:18 +02:00
parent fed0f21603
commit 118315469c

View file

@ -1256,7 +1256,7 @@ float UserInputMapper::getActionState(Action action) const {
Locker locker(_lock);
int index = toInt(action);
if (index >= 0 && index < _actionStates.size()) {
if (index >= 0 && (unsigned int)index < _actionStates.size()) {
return _actionStates[index];
}
@ -1268,7 +1268,7 @@ bool UserInputMapper::getActionStateValid(Action action) const {
Locker locker(_lock);
int index = toInt(action);
if (index >= 0 && index < _actionStatesValid.size()) {
if (index >= 0 && (unsigned int)index < _actionStatesValid.size()) {
return _actionStatesValid[index];
}