summaryrefslogtreecommitdiff
path: root/src/misc_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-03-21 13:19:01 +0000
committerpeter1138 <peter1138@openttd.org>2007-03-21 13:19:01 +0000
commitd7f56f1550ad463c6584595675dbebf745c30a78 (patch)
treee15177888ccaf427ebf30cc793b6da2908c47a8f /src/misc_gui.cpp
parenta9651a8b8f1e9b1f6524721a43e58a2339fc8d61 (diff)
downloadopenttd-d7f56f1550ad463c6584595675dbebf745c30a78.tar.xz
(svn r9388) -Codechange: variable scope and type, and standardify all CargoID loops.
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r--src/misc_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 792afe302..04a20c290 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -141,11 +141,10 @@ static void Place_LandInfo(TileIndex tile)
GetString(_landinfo_data[4], STR_01A8_LOCAL_AUTHORITY, lastof(_landinfo_data[4]));
{
- int i;
char *p = GetString(_landinfo_data[5], STR_01CE_CARGO_ACCEPTED, lastof(_landinfo_data[5]));
bool found = false;
- for (i = 0; i < NUM_CARGO; ++i) {
+ for (CargoID i = 0; i < NUM_CARGO; ++i) {
if (ac[i] > 0) {
/* Add a comma between each item. */
if (found) {
@@ -732,11 +731,10 @@ static void DrawStationCoverageText(const AcceptedCargo accepts,
{
char *b = _userstring;
bool first = true;
- int i;
b = InlineString(b, STR_000D_ACCEPTS);
- for (i = 0; i != NUM_CARGO; i++, mask >>= 1) {
+ for (CargoID i = 0; i < NUM_CARGO; i++, mask >>= 1) {
if (b >= lastof(_userstring) - 5) break;
if (accepts[i] >= 8 && mask & 1) {
if (first) {