From ebcf1fed873f1a75487acedf106f03b299bf8b7e Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Sun, 20 Oct 2013 20:02:48 +0200 Subject: [PATCH] * fixed c++11 warnings --- src/client/battlescape/cl_particle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/battlescape/cl_particle.cpp b/src/client/battlescape/cl_particle.cpp index 58d9211631..2e092cce21 100644 --- a/src/client/battlescape/cl_particle.cpp +++ b/src/client/battlescape/cl_particle.cpp @@ -138,7 +138,7 @@ static char const* const pc_strings[] = { CASSERT(lengthof(pc_strings) == PC_NUM_PTLCMDS); /** @brief particle commands parameter and types */ -static const int pc_types[PC_NUM_PTLCMDS] = { +static const unsigned int pc_types[PC_NUM_PTLCMDS] = { 0, V_UNTYPED, V_UNTYPED, V_UNTYPED, -- 2.37.0 (Apple Git-136) From 79495daac64362202abce00379f899069d1ca1a5 Mon Sep 17 00:00:00 2001 From: Martin Gerhardy Date: Sun, 8 Jun 2014 17:21:58 +0200 Subject: [PATCH] * fixed narrowing compile error with clang * case value evaluates to -1, which cannot be narrowed to type 'GLenum' (aka 'unsigned int') --- src/client/renderer/r_state.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/renderer/r_state.cpp b/src/client/renderer/r_state.cpp index 71d966f542..d03a52cf11 100644 --- a/src/client/renderer/r_state.cpp +++ b/src/client/renderer/r_state.cpp @@ -147,7 +147,8 @@ void R_UseMaterial (const material_t* material) void R_BindArray (GLenum target, GLenum type, const void* array) { - switch (target) { + const int v = static_cast(target); + switch (v) { case GL_VERTEX_ARRAY: glVertexPointer(COMPONENTS_VERTEX_ARRAY3D, type, 0, array); break; @@ -180,7 +181,8 @@ void R_BindArray (GLenum target, GLenum type, const void* array) */ void R_BindDefaultArray (GLenum target) { - switch (target) { + const int v = static_cast(target); + switch (v) { case GL_VERTEX_ARRAY: R_BindArray(target, GL_FLOAT, r_state.vertex_array_3d); break; -- 2.37.0 (Apple Git-136)