mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 07:22:07 +00:00
Replaced pointless comparison with loop_start range check
src/sound/oalsound.cpp:1285:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
This commit is contained in:
parent
93fa9ac1c9
commit
70abf19f76
1 changed files with 3 additions and 2 deletions
|
@ -1282,8 +1282,9 @@ std::pair<SoundHandle,bool> OpenALSoundRenderer::LoadSound(uint8_t *sfxdata, int
|
|||
|
||||
if (!startass) loop_start = Scale(loop_start, srate, 1000);
|
||||
if (!endass) loop_end = Scale(loop_end, srate, 1000);
|
||||
if (loop_start < 0) loop_start = 0;
|
||||
if (loop_end > data.Size() / samplesize) loop_end = data.Size() / samplesize;
|
||||
const uint32_t samples = data.Size() / samplesize;
|
||||
if (loop_start > samples) loop_start = 0;
|
||||
if (loop_end > samples) loop_end = samples;
|
||||
|
||||
if ((loop_start > 0 || loop_end > 0) && loop_end > loop_start && AL.SOFT_loop_points)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue