From bab70a823dd810e1d4477f0c01d3a7b3e9b19ac8 Mon Sep 17 00:00:00 2001 From: alberth Date: Mon, 1 Jun 2009 11:43:36 +0000 Subject: (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. --- src/roadveh_cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/roadveh_cmd.cpp') diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index d52795f9e..59166a46a 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -440,8 +440,8 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 RoadVehicle *v = RoadVehicle::GetIfValid(p1); if (v == NULL || !CheckOwnership(v->owner)) return CMD_ERROR; - if (v->vehstatus & VS_STOPPED || - v->vehstatus & VS_CRASHED || + if ((v->vehstatus & VS_STOPPED) || + (v->vehstatus & VS_CRASHED) || v->breakdown_ctr != 0 || v->overtaking != 0 || v->state == RVSB_WORMHOLE || @@ -935,7 +935,7 @@ static void RoadVehCheckOvertake(RoadVehicle *v, RoadVehicle *u) od.tile = v->tile + TileOffsByDiagDir(DirToDiagDir(v->direction)); if (CheckRoadBlockedForOvertaking(&od)) return; - if (od.u->cur_speed == 0 || od.u->vehstatus& VS_STOPPED) { + if (od.u->cur_speed == 0 || (od.u->vehstatus & VS_STOPPED)) { v->overtaking_ctr = 0x11; v->overtaking = 0x10; } else { @@ -1132,7 +1132,7 @@ do_it:; * pretend we are heading for the tile in front, we'll * see from there */ desttile += TileOffsByDiagDir(dir); - if (desttile == tile && trackdirs & _road_exit_dir_to_incoming_trackdirs[dir]) { + if (desttile == tile && (trackdirs & _road_exit_dir_to_incoming_trackdirs[dir])) { /* If we are already in front of the * station/depot and we can get in from here, * we enter */ -- cgit v1.2.3-54-g00ecf