mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 18:19:43 +01:00
Remove unnecessary string initializations from constructors
std::string is one of those special types that has a constructor that just initializes itself to a blank state automatically. This means all `std::string`s are by default already `""`, so there's no need to set them. And in fact, cppcheck throws out warnings about performance due to initializing `std::string`s this way.
This commit is contained in:
parent
7703b2c1c2
commit
7128e9c3ac
3 changed files with 0 additions and 11 deletions
|
@ -14,8 +14,6 @@ blockclass::blockclass()
|
||||||
rect.w = wp;
|
rect.w = wp;
|
||||||
rect.h = hp;
|
rect.h = hp;
|
||||||
|
|
||||||
prompt = "";
|
|
||||||
script = "";
|
|
||||||
r = 0;
|
r = 0;
|
||||||
g = 0;
|
g = 0;
|
||||||
b = 0;
|
b = 0;
|
||||||
|
|
|
@ -140,7 +140,6 @@ void Game::init(void)
|
||||||
roomchange = false;
|
roomchange = false;
|
||||||
|
|
||||||
|
|
||||||
teleportscript = "";
|
|
||||||
savemystats = false;
|
savemystats = false;
|
||||||
quickrestartkludge = false;
|
quickrestartkludge = false;
|
||||||
|
|
||||||
|
@ -159,7 +158,6 @@ void Game::init(void)
|
||||||
prev_act_fade = 0;
|
prev_act_fade = 0;
|
||||||
backgroundtext = false;
|
backgroundtext = false;
|
||||||
startscript = false;
|
startscript = false;
|
||||||
newscript = "";
|
|
||||||
inintermission = false;
|
inintermission = false;
|
||||||
|
|
||||||
alarmon = false;
|
alarmon = false;
|
||||||
|
@ -176,7 +174,6 @@ void Game::init(void)
|
||||||
activetele = false;
|
activetele = false;
|
||||||
readytotele = 0;
|
readytotele = 0;
|
||||||
oldreadytotele = 0;
|
oldreadytotele = 0;
|
||||||
activity_lastprompt = "";
|
|
||||||
activity_r = 0;
|
activity_r = 0;
|
||||||
activity_g = 0;
|
activity_g = 0;
|
||||||
activity_b = 0;
|
activity_b = 0;
|
||||||
|
@ -203,10 +200,6 @@ void Game::init(void)
|
||||||
nodeathmode = false;
|
nodeathmode = false;
|
||||||
nocutscenes = false;
|
nocutscenes = false;
|
||||||
|
|
||||||
for(int i=0; i<50; i++)
|
|
||||||
{
|
|
||||||
customscript[i]="";
|
|
||||||
}
|
|
||||||
customcol=0;
|
customcol=0;
|
||||||
|
|
||||||
SDL_memset(crewstats, false, sizeof(crewstats));
|
SDL_memset(crewstats, false, sizeof(crewstats));
|
||||||
|
@ -239,7 +232,6 @@ void Game::init(void)
|
||||||
menucountdown = 0;
|
menucountdown = 0;
|
||||||
levelpage=0;
|
levelpage=0;
|
||||||
playcustomlevel=0;
|
playcustomlevel=0;
|
||||||
customleveltitle="";
|
|
||||||
createmenu(Menu::mainmenu);
|
createmenu(Menu::mainmenu);
|
||||||
|
|
||||||
deathcounts = 0;
|
deathcounts = 0;
|
||||||
|
|
|
@ -33,7 +33,6 @@ edlevelclass::edlevelclass()
|
||||||
{
|
{
|
||||||
tileset=0;
|
tileset=0;
|
||||||
tilecol=0;
|
tilecol=0;
|
||||||
roomname="";
|
|
||||||
warpdir=0;
|
warpdir=0;
|
||||||
platx1=0;
|
platx1=0;
|
||||||
platy1=0;
|
platy1=0;
|
||||||
|
|
Loading…
Reference in a new issue