1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Enforce semicolons after usage of WHINE_ONCE

For consistency.

Since WHINE_ONCE ends with a block, the only way to make the compiler
enforce it is to end it with a `do { } while (false)`.
This commit is contained in:
Misa 2021-08-06 21:05:03 -07:00 committed by Ethan Lee
parent 4a07e98015
commit 3094ddb8f3
2 changed files with 10 additions and 9 deletions

View file

@ -760,7 +760,7 @@ void Graphics::drawtile( int x, int y, int t )
{
if (!INBOUNDS_VEC(t, tiles))
{
WHINE_ONCE("drawtile() out-of-bounds!")
WHINE_ONCE("drawtile() out-of-bounds!");
return;
}
@ -784,7 +784,7 @@ void Graphics::drawtile2( int x, int y, int t )
{
if (!INBOUNDS_VEC(t, tiles2))
{
WHINE_ONCE("drawtile2() out-of-bounds!")
WHINE_ONCE("drawtile2() out-of-bounds!");
return;
}
@ -810,7 +810,7 @@ void Graphics::drawtile3( int x, int y, int t, int off, int height_subtract /*=
t += off * 30;
if (!INBOUNDS_VEC(t, tiles3))
{
WHINE_ONCE("drawtile3() out-of-bounds!")
WHINE_ONCE("drawtile3() out-of-bounds!");
return;
}
SDL_Rect src_rect = { 0, 0, tiles_rect.w, tiles_rect.h - height_subtract };
@ -822,7 +822,7 @@ void Graphics::drawtowertile( int x, int y, int t )
{
if (!INBOUNDS_VEC(t, tiles2))
{
WHINE_ONCE("drawtowertile() out-of-bounds!")
WHINE_ONCE("drawtowertile() out-of-bounds!");
return;
}
x += 8;
@ -837,7 +837,7 @@ void Graphics::drawtowertile3( int x, int y, int t, TowerBG& bg_obj )
t += bg_obj.colstate*30;
if (!INBOUNDS_VEC(t, tiles3))
{
WHINE_ONCE("drawtowertile3() out-of-bounds!")
WHINE_ONCE("drawtowertile3() out-of-bounds!");
return;
}
x += 8;
@ -3286,7 +3286,7 @@ void Graphics::drawforetile(int x, int y, int t)
{
if (!INBOUNDS_VEC(t, tiles))
{
WHINE_ONCE("drawforetile() out-of-bounds!")
WHINE_ONCE("drawforetile() out-of-bounds!");
return;
}
@ -3310,7 +3310,7 @@ void Graphics::drawforetile2(int x, int y, int t)
{
if (!INBOUNDS_VEC(t, tiles2))
{
WHINE_ONCE("drawforetile2() out-of-bounds!")
WHINE_ONCE("drawforetile2() out-of-bounds!");
return;
}
@ -3335,7 +3335,7 @@ void Graphics::drawforetile3(int x, int y, int t, int off)
t += off * 30;
if (!INBOUNDS_VEC(t, tiles3))
{
WHINE_ONCE("drawforetile3() out-of-bounds!")
WHINE_ONCE("drawforetile3() out-of-bounds!");
return;
}
SDL_Rect rect;

View file

@ -43,7 +43,8 @@ void VVV_fillstring(
{ \
whine = false; \
puts(message); \
}
} \
do { } while (false)
/* Don't call this directly; use the VVV_between macro. */
void _VVV_between(