summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-03-04 12:14:34 +0000
committerpeter1138 <peter1138@openttd.org>2008-03-04 12:14:34 +0000
commit3907ac518bebec78a7e7175992a01c33faf19a31 (patch)
tree5841819315afbb068ecf4e0ec50dc7d3320852a1
parente1cc80b01cfba5b10af149f576c4a560ceb244f7 (diff)
downloadopenttd-3907ac518bebec78a7e7175992a01c33faf19a31.tar.xz
(svn r12335) -Codechange: Don't stuff signed values into a unsigned variable when the variable can just be unsigned...
-rw-r--r--src/gfx.cpp2
-rw-r--r--src/misc_cmd.cpp6
-rw-r--r--src/openttd.cpp2
-rw-r--r--src/openttd.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 500096170..49d565b29 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -37,7 +37,7 @@ bool _screen_disable_anim = false; ///< Disable palette animation (important f
bool _exit_game;
bool _networking; ///< are we in networking mode?
byte _game_mode;
-byte _pause_game;
+int8 _pause_game;
int _pal_first_dirty;
int _pal_count_dirty;
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp
index 87b945296..5781f7d34 100644
--- a/src/misc_cmd.cpp
+++ b/src/misc_cmd.cpp
@@ -314,11 +314,11 @@ CommandCost CmdPause(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
_pause_game += (p1 == 0) ? -1 : 1;
switch (_pause_game) {
- case (byte)-4:
- case (byte)-1:
+ case -4:
+ case -1:
_pause_game = 0;
break;
- case (byte)-3:
+ case -3:
ShowQuery(
STR_NEWGRF_UNPAUSE_WARNING_TITLE,
STR_NEWGRF_UNPAUSE_WARNING,
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 22f7b433e..66dd0d3a5 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1399,7 +1399,7 @@ bool AfterLoadGame()
switch (gcf_res) {
case GLC_COMPATIBLE: _switch_mode_errorstr = STR_NEWGRF_COMPATIBLE_LOAD_WARNING; break;
- case GLC_NOT_FOUND: _switch_mode_errorstr = STR_NEWGRF_DISABLED_WARNING; _pause_game = (byte)-1; break;
+ case GLC_NOT_FOUND: _switch_mode_errorstr = STR_NEWGRF_DISABLED_WARNING; _pause_game = -1; break;
default: break;
}
diff --git a/src/openttd.h b/src/openttd.h
index 092a0e20b..1050d1679 100644
--- a/src/openttd.h
+++ b/src/openttd.h
@@ -156,6 +156,6 @@ void OTTD_SendThreadMessage(ThreadMsg msg);
extern byte _game_mode;
extern bool _exit_game;
-extern byte _pause_game;
+extern int8 _pause_game;
#endif /* OPENTTD_H */