From 4e1e527b2caf10e0cf5263f6405f1cc8cab2921b Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 21 Apr 2017 22:07:06 +0300 Subject: [PATCH] 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] --- src/sound/oalsound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 00f676f8e..b697282bb 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -1285,7 +1285,7 @@ std::pair 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(loop_start), static_cast(loop_end) }; DPrintf(DMSG_NOTIFY, "Setting loop points %d -> %d\n", loops[0], loops[1]); alBufferiv(buffer, AL_LOOP_POINTS_SOFT, loops); getALError();