Fixed compilation with GCC/Clang

No more 'error: cannot jump from this goto statement to its label / jump bypasses variable initialization'
This commit is contained in:
alexey.lysiuk 2017-01-13 15:44:23 +02:00
parent e57c6e98a8
commit 8260bbbe77

View file

@ -147,6 +147,8 @@ namespace swrenderer
decal_left = decal_pos - edge_left * angvec - ViewPos; decal_left = decal_pos - edge_left * angvec - ViewPos;
decal_right = decal_pos + edge_right * angvec - ViewPos; decal_right = decal_pos + edge_right * angvec - ViewPos;
double texturemid;
if (WallC.Init(decal_left, decal_right, TOO_CLOSE_Z)) if (WallC.Init(decal_left, decal_right, TOO_CLOSE_Z))
goto done; goto done;
@ -214,7 +216,7 @@ namespace swrenderer
} }
yscale = decal->ScaleY; yscale = decal->ScaleY;
double texturemid = WallSpriteTile->TopOffset + (zpos - ViewPos.Z) / yscale; texturemid = WallSpriteTile->TopOffset + (zpos - ViewPos.Z) / yscale;
// Clip sprite to drawseg // Clip sprite to drawseg
x1 = MAX<int>(clipper->x1, x1); x1 = MAX<int>(clipper->x1, x1);