From 5b33fae2024891f69b85eff28a52e811b874b3cc Mon Sep 17 00:00:00 2001 From: Garux Date: Mon, 21 Jun 2021 17:07:03 +0300 Subject: [PATCH] fix clang error: variable-sized object may not be initialized --- tools/quake3/q3map2/autopk3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/quake3/q3map2/autopk3.cpp b/tools/quake3/q3map2/autopk3.cpp index aa3eea1f..c75556d0 100644 --- a/tools/quake3/q3map2/autopk3.cpp +++ b/tools/quake3/q3map2/autopk3.cpp @@ -247,7 +247,7 @@ int pk3BSPMain( int argc, char **argv ){ /* extract map name */ const CopiedString nameOFmap( PathFilename( source ) ); - bool drawsurfSHs[numBSPShaders] = { 0 }; + std::vector drawsurfSHs( numBSPShaders, false ); for ( i = 0; i < numBSPDrawSurfaces; ++i ){ drawsurfSHs[ bspDrawSurfaces[i].shaderNum ] = true; @@ -919,7 +919,7 @@ int repackBSPMain( int argc, char **argv ){ /* extract map name */ const CopiedString nameOFmap( PathFilename( source ) ); - bool drawsurfSHs[numBSPShaders] = { 0 }; + std::vector drawsurfSHs( numBSPShaders, false ); for ( i = 0; i < numBSPDrawSurfaces; ++i ){ drawsurfSHs[ bspDrawSurfaces[i].shaderNum ] = true;