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:
alexey.lysiuk 2017-04-23 14:42:47 +03:00
parent 93fa9ac1c9
commit 70abf19f76

View file

@ -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)
{