Mercurial > hg > openttd
changeset 3504:a1f4afd9767b draft
(svn r4355) - NewGRF: Minor clean up; use the correct return type and remove extraneous brackets.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Tue, 11 Apr 2006 10:53:07 +0000 |
parents | 601ca078364a |
children | 9604df1e9283 |
files | newgrf.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/newgrf.c +++ b/newgrf.c @@ -1007,7 +1007,7 @@ { byte *buf = *bufp; int i; - int ret = 0; + bool ret = false; switch (prop) { case 0x08: /* Year of availability */ @@ -1067,7 +1067,7 @@ break; default: - ret = 1; + ret = true; } *bufp = buf; @@ -1081,7 +1081,7 @@ 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 @@ grfmsg(GMS_WARN, "GlobalVarChangeInfo: Price %d out of range, ignoring.", price); } } - } break; + break; + default: ret = true; } + *bufp = buf; return ret; }