mirror of https://github.com/OpenTTD/OpenTTD
(svn r14292) -Cleanup (r11128): Move an 'if' out of a loop as it does not need to be iterated. (spotted by smatz)
parent
33c2b798fb
commit
80b0671cc9
|
@ -346,6 +346,9 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The wire above the tunnel is drawn together with the tunnel-roof (see DrawCatenaryOnTunnel()) */
|
||||||
|
if (IsTunnelTile(ti->tile)) return;
|
||||||
|
|
||||||
/* Don't draw a wire under a low bridge */
|
/* Don't draw a wire under a low bridge */
|
||||||
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
|
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
|
||||||
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
||||||
|
@ -356,7 +359,6 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
||||||
/* Drawing of pylons is finished, now draw the wires */
|
/* Drawing of pylons is finished, now draw the wires */
|
||||||
for (Track t = TRACK_BEGIN; t < TRACK_END; t++) {
|
for (Track t = TRACK_BEGIN; t < TRACK_END; t++) {
|
||||||
if (HasBit(trackconfig[TS_HOME], t)) {
|
if (HasBit(trackconfig[TS_HOME], t)) {
|
||||||
if (IsTunnelTile(ti->tile)) break; // drawn together with tunnel-roof (see DrawCatenaryOnTunnel())
|
|
||||||
byte PCPconfig = HasBit(PCPstatus, PCPpositions[t][0]) +
|
byte PCPconfig = HasBit(PCPstatus, PCPpositions[t][0]) +
|
||||||
(HasBit(PCPstatus, PCPpositions[t][1]) << 1);
|
(HasBit(PCPstatus, PCPpositions[t][1]) << 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue