From 8260bbbe77cc0fee62b190b27362b2f769678969 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 13 Jan 2017 15:44:23 +0200 Subject: [PATCH] Fixed compilation with GCC/Clang No more 'error: cannot jump from this goto statement to its label / jump bypasses variable initialization' --- src/swrenderer/things/r_decal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/swrenderer/things/r_decal.cpp b/src/swrenderer/things/r_decal.cpp index 554864670c..203401ec48 100644 --- a/src/swrenderer/things/r_decal.cpp +++ b/src/swrenderer/things/r_decal.cpp @@ -147,6 +147,8 @@ namespace swrenderer decal_left = decal_pos - edge_left * angvec - ViewPos; decal_right = decal_pos + edge_right * angvec - ViewPos; + double texturemid; + if (WallC.Init(decal_left, decal_right, TOO_CLOSE_Z)) goto done; @@ -214,7 +216,7 @@ namespace swrenderer } yscale = decal->ScaleY; - double texturemid = WallSpriteTile->TopOffset + (zpos - ViewPos.Z) / yscale; + texturemid = WallSpriteTile->TopOffset + (zpos - ViewPos.Z) / yscale; // Clip sprite to drawseg x1 = MAX(clipper->x1, x1);