summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-11 10:53:07 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-11 10:53:07 +0000
commit64a237b192161878e9bab2f3f4da62ab0c8d81a3 (patch)
tree6c285175eb647056a6fa2567503ee5d2f6e4b927
parent5f24141cb8ca3fbf7fcce9a30378f938e9206e03 (diff)
downloadopenttd-64a237b192161878e9bab2f3f4da62ab0c8d81a3.tar.xz
(svn r4355) - NewGRF: Minor clean up; use the correct return type and remove extraneous brackets.
-rw-r--r--newgrf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/newgrf.c b/newgrf.c
index 8b6ff2c58..7ef56b662 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -1007,7 +1007,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int
{
byte *buf = *bufp;
int i;
- int ret = 0;
+ bool ret = false;
switch (prop) {
case 0x08: /* Year of availability */
@@ -1067,7 +1067,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int
break;
default:
- ret = 1;
+ ret = true;
}
*bufp = buf;
@@ -1081,7 +1081,7 @@ static bool GlobalVarChangeInfo(uint gvid, int numinfo, int prop, byte **bufp, i
bool ret = false;
switch (prop) {
- case 0x08: { /* Cost base factor */
+ case 0x08: /* Cost base factor */
FOR_EACH_OBJECT {
byte factor = grf_load_byte(&buf);
uint price = gvid + i;
@@ -1092,10 +1092,12 @@ static bool GlobalVarChangeInfo(uint gvid, int numinfo, int prop, byte **bufp, i
grfmsg(GMS_WARN, "GlobalVarChangeInfo: Price %d out of range, ignoring.", price);
}
}
- } break;
+ break;
+
default:
ret = true;
}
+
*bufp = buf;
return ret;
}