mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -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()");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user