1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-02 02:53:32 +02:00

Style: Fixup instances of void arguments

The style we have here is that functions with no arguments are to have
explicit `void` arguments, even though this doesn't apply in C++,
because it does apply in C.

Unfortunately, some have slipped through the cracks. This commit fixes
them.
This commit is contained in:
Misa 2023-03-18 15:24:14 -07:00
parent 63bc71b796
commit 9a87d23719
11 changed files with 32 additions and 32 deletions

View File

@ -754,7 +754,7 @@ void Game::setstate(const int gamestate)
}
}
void Game::incstate()
void Game::incstate(void)
{
if (!statelocked)
{
@ -770,12 +770,12 @@ void Game::setstatedelay(const int delay)
}
}
void Game::lockstate()
void Game::lockstate(void)
{
statelocked = true;
}
void Game::unlockstate()
void Game::unlockstate(void)
{
statelocked = false;
}
@ -7394,7 +7394,7 @@ void Game::sabotage_time_trial(void)
timetrialparlost = true;
}
bool Game::isingamecompletescreen()
bool Game::isingamecompletescreen(void)
{
return (state >= 3501 && state <= 3518) || (state >= 3520 && state <= 3522);
}

View File

@ -175,13 +175,13 @@ public:
void setstate(int gamestate);
void incstate();
void incstate(void);
void setstatedelay(int delay);
void lockstate();
void lockstate(void);
void unlockstate();
void unlockstate(void);
void updatestate(void);
@ -265,7 +265,7 @@ public:
bool hascontrol, jumpheld;
int jumppressed;
int gravitycontrol;
bool isingamecompletescreen();
bool isingamecompletescreen(void);
bool muted;
int mutebutton;

View File

@ -548,7 +548,7 @@ int Graphics::clear(const int r, const int g, const int b, const int a)
return result;
}
int Graphics::clear()
int Graphics::clear(void)
{
return clear(0, 0, 0, 255);
}
@ -3099,7 +3099,7 @@ void Graphics::textboxpadtowidth(size_t new_w)
textboxes[m].padtowidth(new_w);
}
void Graphics::textboxcentertext()
void Graphics::textboxcentertext(void)
{
if (!INBOUNDS_VEC(m, textboxes))
{
@ -3122,7 +3122,7 @@ void Graphics::textboxprintflags(const uint32_t flags)
textboxes[m].resize();
}
void Graphics::textboxcommsrelay()
void Graphics::textboxcommsrelay(void)
{
/* Special treatment for the gamestate textboxes in Comms Relay */
if (!INBOUNDS_VEC(m, textboxes))

View File

@ -107,11 +107,11 @@ public:
void textboxpadtowidth(size_t new_w);
void textboxcentertext();
void textboxcentertext(void);
void textboxprintflags(uint32_t flags);
void textboxcommsrelay();
void textboxcommsrelay(void);
void textboxadjust(void);
@ -190,7 +190,7 @@ public:
int set_blendmode(SDL_Texture* texture, SDL_BlendMode blendmode);
int clear(int r, int g, int b, int a);
int clear();
int clear(void);
int copy_texture(SDL_Texture* texture, const SDL_Rect* src, const SDL_Rect* dest);
int copy_texture(SDL_Texture* texture, const SDL_Rect* src, const SDL_Rect* dest, double angle, const SDL_Point* center, SDL_RendererFlip flip);

View File

@ -125,12 +125,12 @@ end:
VVV_free(mem);
}
void Dispose()
void Dispose(void)
{
VVV_free(wav_buffer);
}
void Play()
void Play(void)
{
if (!valid)
{
@ -200,7 +200,7 @@ end:
}
}
static void Pause()
static void Pause(void)
{
for (size_t i = 0; i < VVV_MAX_CHANNELS; i++)
{
@ -208,7 +208,7 @@ end:
}
}
static void Resume()
static void Resume(void)
{
for (size_t i = 0; i < VVV_MAX_CHANNELS; i++)
{
@ -216,7 +216,7 @@ end:
}
}
static void Destroy()
static void Destroy(void)
{
if (voices != NULL)
{
@ -291,7 +291,7 @@ end:
SDL_RWclose(rw);
}
void Dispose()
void Dispose(void)
{
stb_vorbis_close(vorbis);
VVV_free(read_buf);
@ -351,7 +351,7 @@ end:
return true;
}
static void Halt()
static void Halt(void)
{
if (!IsHalted())
{
@ -361,12 +361,12 @@ end:
}
}
static bool IsHalted()
static bool IsHalted(void)
{
return musicVoice == NULL;
}
static void Pause()
static void Pause(void)
{
if (!IsHalted())
{
@ -375,12 +375,12 @@ end:
}
}
static bool IsPaused()
static bool IsPaused(void)
{
return paused || IsHalted();
}
static void Resume()
static void Resume(void)
{
if (!IsHalted())
{
@ -872,7 +872,7 @@ void musicclass::play(int t)
}
}
void musicclass::resume()
void musicclass::resume(void)
{
MusicTrack::Resume();
}

View File

@ -19,7 +19,7 @@ public:
void destroy(void);
void play(int t);
void resume();
void resume(void);
void resumefade(const int fadein_ms);
void pause(void);
void haltdasmusik(void);

View File

@ -2284,7 +2284,7 @@ static void draw_roomname_menu(void)
* the same in Flip Mode. */
#define FLIP(y, h) (graphics.flipmode ? 220 - (y) - (h) : (y))
static MapRenderData getmaprenderdata()
static MapRenderData getmaprenderdata(void)
{
MapRenderData data;

View File

@ -267,7 +267,7 @@ void Screen::GetWindowSize(int* x, int* y)
}
}
void Screen::RenderPresent()
void Screen::RenderPresent(void)
{
SDL_RenderPresent(m_renderer);
graphics.clear();

View File

@ -19,7 +19,7 @@ public:
void ResizeToNearestMultiple(void);
void GetWindowSize(int* x, int* y);
void RenderPresent();
void RenderPresent(void);
void toggleFullScreen(void);
void toggleScalingMode(void);

View File

@ -159,7 +159,7 @@ void textboxclass::padtowidth(size_t new_w)
resize();
}
void textboxclass::centertext()
void textboxclass::centertext(void)
{
padtowidth(w-16);
}

View File

@ -32,7 +32,7 @@ public:
void padtowidth(size_t new_w);
void centertext();
void centertext(void);
public:
//Fundamentals
std::vector<std::string> lines;