From 2e02a8dd7549a6abf5d2f75d6252739bee752637 Mon Sep 17 00:00:00 2001 From: Aciz Date: Mon, 20 Oct 2025 20:55:34 +0300 Subject: [PATCH] fix decltype declarations for GCC in MergeBspMain 'decltype(foo) foo = std::move(::foo)' is ambiguous on GCC and fails to compile, because it cannot determine whether you're trying to bind to the just created variable in the local scope, or the one that exists in global scope. --- tools/quake3/q3map2/convert_bsp.cpp | 34 ++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/quake3/q3map2/convert_bsp.cpp b/tools/quake3/q3map2/convert_bsp.cpp index 25164232..ecd2bc7c 100644 --- a/tools/quake3/q3map2/convert_bsp.cpp +++ b/tools/quake3/q3map2/convert_bsp.cpp @@ -700,23 +700,23 @@ int MergeBSPMain( Args& args ){ struct { - decltype( entities ) entities = std::move( ::entities ); - decltype( bspModels ) bspModels = std::move( ::bspModels ); - decltype( bspShaders ) bspShaders = std::move( ::bspShaders ); - decltype( bspLeafs ) bspLeafs = std::move( ::bspLeafs ); - decltype( bspPlanes ) bspPlanes = std::move( ::bspPlanes ); - decltype( bspNodes ) bspNodes = std::move( ::bspNodes ); - decltype( bspLeafSurfaces ) bspLeafSurfaces = std::move( ::bspLeafSurfaces ); - decltype( bspLeafBrushes ) bspLeafBrushes = std::move( ::bspLeafBrushes ); - decltype( bspBrushes ) bspBrushes = std::move( ::bspBrushes ); - decltype( bspBrushSides ) bspBrushSides = std::move( ::bspBrushSides ); - decltype( bspLightBytes ) bspLightBytes = std::move( ::bspLightBytes ); - decltype( bspGridPoints ) bspGridPoints = std::move( ::bspGridPoints ); - decltype( bspVisBytes ) bspVisBytes = std::move( ::bspVisBytes ); - decltype( bspDrawVerts ) bspDrawVerts = std::move( ::bspDrawVerts ); - decltype( bspDrawIndexes ) bspDrawIndexes = std::move( ::bspDrawIndexes ); - decltype( bspDrawSurfaces ) bspDrawSurfaces = std::move( ::bspDrawSurfaces ); - decltype( bspFogs ) bspFogs = std::move( ::bspFogs ); + decltype( ::entities ) entities = std::move( ::entities ); + decltype( ::bspModels ) bspModels = std::move( ::bspModels ); + decltype( ::bspShaders ) bspShaders = std::move( ::bspShaders ); + decltype( ::bspLeafs ) bspLeafs = std::move( ::bspLeafs ); + decltype( ::bspPlanes ) bspPlanes = std::move( ::bspPlanes ); + decltype( ::bspNodes ) bspNodes = std::move( ::bspNodes ); + decltype( ::bspLeafSurfaces ) bspLeafSurfaces = std::move( ::bspLeafSurfaces ); + decltype( ::bspLeafBrushes ) bspLeafBrushes = std::move( ::bspLeafBrushes ); + decltype( ::bspBrushes ) bspBrushes = std::move( ::bspBrushes ); + decltype( ::bspBrushSides ) bspBrushSides = std::move( ::bspBrushSides ); + decltype( ::bspLightBytes ) bspLightBytes = std::move( ::bspLightBytes ); + decltype( ::bspGridPoints ) bspGridPoints = std::move( ::bspGridPoints ); + decltype( ::bspVisBytes ) bspVisBytes = std::move( ::bspVisBytes ); + decltype( ::bspDrawVerts ) bspDrawVerts = std::move( ::bspDrawVerts ); + decltype( ::bspDrawIndexes ) bspDrawIndexes = std::move( ::bspDrawIndexes ); + decltype( ::bspDrawSurfaces ) bspDrawSurfaces = std::move( ::bspDrawSurfaces ); + decltype( ::bspFogs ) bspFogs = std::move( ::bspFogs ); } bsp; /* do some path mangling */