diff options
author | rubidium <rubidium@openttd.org> | 2010-05-13 10:14:29 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-05-13 10:14:29 +0000 |
commit | 062dd0e24c283f210216ede06bbde0ed72c7ed25 (patch) | |
tree | a917e975f1f5d4c144ecad2c799cf58764a1f592 /src/console_gui.cpp | |
parent | a2d6961ab3c9aa43b95dfe9fa4699d290e5627e2 (diff) | |
download | openttd-062dd0e24c283f210216ede06bbde0ed72c7ed25.tar.xz |
(svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int
Diffstat (limited to 'src/console_gui.cpp')
-rw-r--r-- | src/console_gui.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/console_gui.cpp b/src/console_gui.cpp index ac0e6103c..0c187407e 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -21,13 +21,10 @@ #include "console_func.h" #include "rev.h" - -enum { - ICON_HISTORY_SIZE = 20, - ICON_LINE_SPACING = 2, - ICON_RIGHT_BORDERWIDTH = 10, - ICON_BOTTOM_BORDERWIDTH = 12, -}; +static const uint ICON_HISTORY_SIZE = 20; +static const uint ICON_LINE_SPACING = 2; +static const uint ICON_RIGHT_BORDERWIDTH = 10; +static const uint ICON_BOTTOM_BORDERWIDTH = 12; /** * Container for a single line of console output @@ -446,7 +443,7 @@ static void IConsoleHistoryNavigate(int direction) /* watch out for overflows, just wrap around */ if (i < 0) i = ICON_HISTORY_SIZE - 1; - if (i >= ICON_HISTORY_SIZE) i = 0; + if ((uint)i >= ICON_HISTORY_SIZE) i = 0; if (direction > 0) { if (_iconsole_history[i] == NULL) i = 0; |