summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-25 00:45:52 +0000
committeryexo <yexo@openttd.org>2009-02-25 00:45:52 +0000
commit3bb872e7dd8ec9318cd60bb9ca417b4d80f8fc34 (patch)
tree0821775e819b64e32e518cdd87b874fb720c4d92 /src/openttd.cpp
parent901230bde1b0752d97d63aabaa0fd38c9ea183e7 (diff)
downloadopenttd-3bb872e7dd8ec9318cd60bb9ca417b4d80f8fc34.tar.xz
(svn r15576) -Codechange: rename SwitchModes to SwitchMode and don't hardcode the values for that enum.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index b03f990f0..692f09698 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -867,7 +867,7 @@ bool SafeSaveOrLoad(const char *filename, int mode, GameMode newgm, Subdirectory
}
}
-void SwitchMode(int new_mode)
+void SwitchToMode(SwitchMode new_mode)
{
#ifdef ENABLE_NETWORK
/* If we are saving something, the network stays in his current state */
@@ -1002,6 +1002,8 @@ void SwitchMode(int new_mode)
/* XXX: set date */
MarkWholeScreenDirty();
break;
+
+ default: NOT_REACHED();
}
if (_switch_mode_errorstr != INVALID_STRING_ID) {
@@ -1146,7 +1148,7 @@ void GameLoop()
/* switch game mode? */
if (_switch_mode != SM_NONE) {
- SwitchMode(_switch_mode);
+ SwitchToMode(_switch_mode);
_switch_mode = SM_NONE;
}