mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-01 00:39:41 +01:00
Invert contents check in scriptclass::loadcustom()
The entirety of the rest of scriptclass::loadcustom() is encased in a block that first checks if the script with the name even exists. Instead of indenting the rest of the function, just invert the check and reduce indentation level.
This commit is contained in:
parent
8edf2f0ac6
commit
6e0119d753
1 changed files with 4 additions and 2 deletions
|
@ -3564,7 +3564,10 @@ void scriptclass::loadcustom(std::string t)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(contents != NULL){
|
||||
if(contents == NULL){
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<std::string>& lines = *contents;
|
||||
|
||||
//Ok, we've got the relavent script segment, we do a pass to assess it, then run it!
|
||||
|
@ -3824,5 +3827,4 @@ void scriptclass::loadcustom(std::string t)
|
|||
add("endcutscene()");
|
||||
add("untilbars()");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue