1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 22:18:30 +02:00
VVVVVV/desktop_version/src
Misa 6a3a1fe147
Explicitly declare void for all void parameter functions (#628)
Apparently in C, if you have `void test();`, it's completely okay to do
`test(2);`. The function will take in the argument, but just discard it
and throw it away. It's like a trash can, and a rude one at that. If you
declare it like `void test(void);`, this is prevented.

This is not a problem in C++ - doing `void test();` and `test(2);` is
guaranteed to result in a compile error (this also means that right now,
at least in all `.cpp` files, nobody is ever calling a void parameter
function with arguments and having their arguments be thrown away).
However, we may not be using C++ in the future, so I just want to lay
down the precedent that if a function takes in no arguments, you must
explicitly declare it as such.

I would've added `-Wstrict-prototypes`, but it produces an annoying
warning message saying it doesn't work in C++ mode if you're compiling
in C++ mode. So it can be added later.
2021-02-25 17:23:59 -05:00
..
BinaryBlob.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
BinaryBlob.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
BlockV.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
BlockV.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Credits.h Fix entities in the Warp Zone's gray tileset not being gray in the editor (#480) 2020-09-25 13:35:03 -04:00
editor.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
editor.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Ent.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Ent.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Entity.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Entity.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Enums.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
Exit.h Add VVV_exit() 2021-02-15 23:07:35 -05:00
FileSystemUtils.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
FileSystemUtils.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Finalclass.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Finalclass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Game.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Game.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
GOGNetwork.c Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Graphics.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Graphics.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
GraphicsResources.cpp Free data upon failure in LoadImage() 2021-01-18 13:06:43 -05:00
GraphicsResources.h Consistently use angle brackets for SDL.h includes 2020-07-19 21:37:40 -04:00
GraphicsUtil.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
GraphicsUtil.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Input.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Input.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
KeyPoll.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
KeyPoll.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Labclass.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Labclass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Logic.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Logic.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
main.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
MakeAndPlay.h Re-comment out #define MAKEANDPLAY 2020-02-09 10:42:03 -05:00
Map.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Map.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Maths.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Music.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Music.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Network.c Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Network.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Otherlevel.cpp Bounds check all entity getters that can return 0 2020-09-25 13:51:47 -04:00
Otherlevel.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
preloader.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
preloader.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Render.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Render.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
RenderFixed.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
RenderFixed.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Screen.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Screen.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
ScreenSettings.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Script.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Script.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Scripts.cpp Make 'custom_' check more readable 2020-09-27 16:31:40 -04:00
SoundSystem.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
SoundSystem.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Spacestation2.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Spacestation2.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
SteamNetwork.c Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
TerminalScripts.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Textbox.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Textbox.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
ThirdPartyDeps.c Reduce dependency on libc functions 2021-01-12 14:02:31 -05:00
Tower.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Tower.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
TowerBG.h Move mapclass r/g/b variables off onto TowerBG 2021-01-07 21:15:34 -05:00
UtilityClass.cpp Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
UtilityClass.h Explicitly declare void for all void parameter functions (#628) 2021-02-25 17:23:59 -05:00
Version.h Don't recompile all files when the commit hash is changed 2020-12-25 20:17:01 -05:00
Version.h.in Don't recompile all files when the commit hash is changed 2020-12-25 20:17:01 -05:00
WarpClass.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
WarpClass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
XMLUtils.cpp Move all settings to settings.vvv 2020-11-04 12:06:57 -05:00
XMLUtils.h Move all settings to settings.vvv 2020-11-04 12:06:57 -05:00