Fixed compilation with Clang

src/sound/oalsound.cpp:1288: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'ALint' (aka 'int') in initializer list [-Wc++11-narrowing]
This commit is contained in:
alexey.lysiuk 2017-04-21 22:07:06 +03:00
parent 3ccd4aa0d1
commit 4e1e527b2c

View file

@ -1285,7 +1285,7 @@ std::pair<SoundHandle,bool> OpenALSoundRenderer::LoadSound(uint8_t *sfxdata, int
if ((loop_start > 0 || loop_end > 0) && loop_end > loop_start && AL.SOFT_loop_points)
{
ALint loops[2] = { loop_start, loop_end };
ALint loops[2] = { static_cast<ALint>(loop_start), static_cast<ALint>(loop_end) };
DPrintf(DMSG_NOTIFY, "Setting loop points %d -> %d\n", loops[0], loops[1]);
alBufferiv(buffer, AL_LOOP_POINTS_SOFT, loops);
getALError();