mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Ensure that all member attributes are initialized
I ran the game through cppcheck and it spat out a bunch of member attributes that weren't being initialized. So I initialized them. In the previous version of this commit, I added constructors to GraphicsResources, otherlevelclass, labclass, warpclass, and finalclass, but flibit says this changes the code flow enough that it's risky to merge before 2.4, so I got rid of those constructors, too.
This commit is contained in:
@@ -72,6 +72,28 @@ void entityclass::init()
|
||||
resetallflags();
|
||||
SDL_memset(collect, false, sizeof(collect));
|
||||
SDL_memset(customcollect, false, sizeof(customcollect));
|
||||
|
||||
colpoint1 = point();
|
||||
colpoint2 = point();
|
||||
tempx = 0;
|
||||
tempy = 0;
|
||||
tempw = 0;
|
||||
temph = 0;
|
||||
temp = 0;
|
||||
temp2 = 0;
|
||||
tpx1 = 0;
|
||||
tpy1 = 0;
|
||||
tpx2 = 0;
|
||||
tpy2 = 0;
|
||||
x = 0;
|
||||
k = 0;
|
||||
dx = 0.0f;
|
||||
dy = 0.0f;
|
||||
dr = 0.0f;
|
||||
px = 0;
|
||||
py = 0;
|
||||
linetemp = 0;
|
||||
activetrigger = 0;
|
||||
}
|
||||
|
||||
void entityclass::resetallflags()
|
||||
|
||||
Reference in New Issue
Block a user