mirror of https://github.com/OpenTTD/OpenTTD
(svn r4355) - NewGRF: Minor clean up; use the correct return type and remove extraneous brackets.
parent
5f24141cb8
commit
64a237b192
10
newgrf.c
10
newgrf.c
|
@ -1007,7 +1007,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int
|
||||||
{
|
{
|
||||||
byte *buf = *bufp;
|
byte *buf = *bufp;
|
||||||
int i;
|
int i;
|
||||||
int ret = 0;
|
bool ret = false;
|
||||||
|
|
||||||
switch (prop) {
|
switch (prop) {
|
||||||
case 0x08: /* Year of availability */
|
case 0x08: /* Year of availability */
|
||||||
|
@ -1067,7 +1067,7 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = 1;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
*bufp = buf;
|
*bufp = buf;
|
||||||
|
@ -1081,7 +1081,7 @@ static bool GlobalVarChangeInfo(uint gvid, int numinfo, int prop, byte **bufp, i
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
switch (prop) {
|
switch (prop) {
|
||||||
case 0x08: { /* Cost base factor */
|
case 0x08: /* Cost base factor */
|
||||||
FOR_EACH_OBJECT {
|
FOR_EACH_OBJECT {
|
||||||
byte factor = grf_load_byte(&buf);
|
byte factor = grf_load_byte(&buf);
|
||||||
uint price = gvid + i;
|
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);
|
grfmsg(GMS_WARN, "GlobalVarChangeInfo: Price %d out of range, ignoring.", price);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
*bufp = buf;
|
*bufp = buf;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue