Changeset - r4084:73cfb05c46ef
[Not reviewed]
master
0 1 0
tron - 18 years ago 2006-06-28 06:21:03
tron@openttd.org
(svn r5399) Simplify a conditional expression: (a && b) || (!a && !b) -> a == b
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
vehicle_gui.c
Show inline comments
 
@@ -538,9 +538,8 @@ static void SetupScrollStuffForReplaceWi
 
				const EngineInfo* info = EngInfo(eid);
 

	
 
				// left window contains compatible engines while right window only contains engines of the selected type
 
				if (ENGINE_AVAILABLE && (
 
							(RailVehInfo(eid)->power != 0 && WP(w, replaceveh_d).wagon_btnstate) ||
 
							(RailVehInfo(eid)->power == 0 && !WP(w, replaceveh_d).wagon_btnstate))) {
 
				if (ENGINE_AVAILABLE &&
 
						(RailVehInfo(eid)->power != 0) == (WP(w, replaceveh_d).wagon_btnstate != 0)) {
 
					if (IsCompatibleRail(e->railtype, railtype) && (_player_num_engines[eid] > 0 || EngineHasReplacementForPlayer(p, eid))) {
 
						if (sel[0] == count) selected_id[0] = eid;
 
						count++;
0 comments (0 inline, 0 general)