From c832a5591081b77c1bb62e111d77210b1b6d81b9 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 30 Aug 2017 03:12:13 +0200 Subject: [PATCH] =?UTF-8?q?avoid=20=E2=80=9Cunused=E2=80=9D=20warning=20be?= =?UTF-8?q?cause=20usage=20is=20in=20debug=20code=20only?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/shaders/shaders.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/shaders/shaders.cpp b/plugins/shaders/shaders.cpp index a8ea6496..a389b55f 100644 --- a/plugins/shaders/shaders.cpp +++ b/plugins/shaders/shaders.cpp @@ -431,18 +431,18 @@ int WINAPI QERApp_LoadShadersFromDir( const char *path ){ if ( strstr( pShader->getShaderFileName(), around ) != NULL || g_str_has_prefix( pShader->getName(), prefix ) ) { count++; +#ifdef _DEBUG // request the shader, this will load the texture if needed and set "inuse" //++timo FIXME: should we put an Activate member on CShader? // this QERApp_Shader_ForName call is a kind of hack IShader *pFoo = QERApp_Shader_ForName( pShader->getName() ); -#ifdef _DEBUG // check we activated the right shader // NOTE: if there was something else loaded, the size of g_Shaders may have changed and strange behaviours are to be expected if ( pFoo != pShader ) { Sys_FPrintf( SYS_WRN, "WARNING: unexpected pFoo != pShader in QERApp_LoadShadersFromDir\n" ); } #else - pFoo = NULL; // leo: shut up the compiler + QERApp_Shader_ForName( pShader->getName() ); #endif } }