Fix integer sign difference comparison warnings

This commit is contained in:
Pokechu22
2022-01-17 00:21:58 -08:00
parent 5f9e04be1d
commit 50d9349926
3 changed files with 8 additions and 7 deletions

View File

@ -1031,7 +1031,7 @@ int AddOnStateChangedCallback(StateChangedCallbackFunc callback)
bool RemoveOnStateChangedCallback(int* handle)
{
if (handle && *handle >= 0 && s_on_state_changed_callbacks.size() > *handle)
if (handle && *handle >= 0 && s_on_state_changed_callbacks.size() > static_cast<size_t>(*handle))
{
s_on_state_changed_callbacks[*handle] = StateChangedCallbackFunc();
*handle = -1;