(svn r3173) Use the trinary operator and switch to improve readability

Also align short cases nicely
This commit is contained in:
tron
2005-11-13 14:54:09 +00:00
parent ee15e3de13
commit 4a14a586e2
15 changed files with 235 additions and 305 deletions

View File

@@ -707,12 +707,11 @@ bool SafeSaveOrLoad(const char *filename, int mode, int newgm)
_game_mode = newgm;
r = SaveOrLoad(filename, mode);
if (r == SL_REINIT) {
if (ogm == GM_MENU)
LoadIntroGame();
else if (ogm == GM_EDITOR)
MakeNewEditorWorld();
else
MakeNewGame();
switch (ogm) {
case GM_MENU: LoadIntroGame(); break;
case GM_EDITOR: MakeNewEditorWorld(); break;
default: MakeNewGame(); break;
}
return false;
} else if (r != SL_OK) {
_game_mode = ogm;