mirror of https://github.com/axmolengine/axmol.git
Add explicit type casts to suppress -Wformat warnings (#16306)
This commit is contained in:
parent
b135d512d2
commit
a5f36e70a5
|
@ -219,7 +219,7 @@ int AudioEngineImpl::play2d(const std::string &filePath ,bool loop ,float volume
|
|||
|
||||
if (state != IAudioPlayer::State::OVER && state != IAudioPlayer::State::STOPPED)
|
||||
{
|
||||
ALOGV("Ignore state: %d", state);
|
||||
ALOGV("Ignore state: %d", static_cast<int>(state));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ void AudioMixerController::mixOneFrame()
|
|||
}
|
||||
else
|
||||
{
|
||||
ALOGW("Previous state (%d) isn't PAUSED, couldn't resume!", track->getPrevState());
|
||||
ALOGW("Previous state (%d) isn't PAUSED, couldn't resume!", static_cast<int>(track->getPrevState()));
|
||||
}
|
||||
}
|
||||
else if (state == Track::State::PAUSED)
|
||||
|
@ -231,7 +231,7 @@ void AudioMixerController::mixOneFrame()
|
|||
}
|
||||
else
|
||||
{
|
||||
ALOGW("Previous state (%d) isn't PLAYING, couldn't pause!", track->getPrevState());
|
||||
ALOGW("Previous state (%d) isn't PLAYING, couldn't pause!", static_cast<int>(track->getPrevState()));
|
||||
}
|
||||
}
|
||||
else if (state == Track::State::STOPPED)
|
||||
|
|
|
@ -169,7 +169,7 @@ void UrlAudioPlayer::stop()
|
|||
}
|
||||
else
|
||||
{
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing or paused, could not invoke stop!", this, _state);
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing or paused, could not invoke stop!", this, static_cast<int>(_state));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ void UrlAudioPlayer::pause()
|
|||
}
|
||||
else
|
||||
{
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing, could not invoke pause!", this, _state);
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't playing, could not invoke pause!", this, static_cast<int>(_state));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ void UrlAudioPlayer::resume()
|
|||
}
|
||||
else
|
||||
{
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused, could not invoke resume!", this, _state);
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused, could not invoke resume!", this, static_cast<int>(_state));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ void UrlAudioPlayer::play()
|
|||
}
|
||||
else
|
||||
{
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused or initialized, could not invoke play!", this, _state);
|
||||
ALOGW("UrlAudioPlayer (%p, state:%d) isn't paused or initialized, could not invoke play!", this, static_cast<int>(_state));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue