mirror of https://github.com/OpenTTD/OpenTTD
(svn r1326) fixed compiler warnings in vehicle_gui.c and widget.c
parent
efc2702491
commit
6a6cbdd9b4
|
@ -526,7 +526,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
|
||||||
byte cargo;
|
byte cargo;
|
||||||
EngineInfo *info;
|
EngineInfo *info;
|
||||||
|
|
||||||
if ( selected_id[0] >= ROAD_ENGINES_INDEX && selected_id[0] <= SHIP_ENGINES_INDEX )
|
if ( selected_id[0] >= ROAD_ENGINES_INDEX && selected_id[0] <= SHIP_ENGINES_INDEX ) {
|
||||||
cargo = RoadVehInfo(selected_id[0])->cargo_type;
|
cargo = RoadVehInfo(selected_id[0])->cargo_type;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -549,7 +549,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
|
||||||
sel[0]--;
|
sel[0]--;
|
||||||
}
|
}
|
||||||
} while (++engine_id, ++e,--num);
|
} while (++engine_id, ++e,--num);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,7 +563,6 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
|
||||||
if ( selected_id[0] != -1 ) {
|
if ( selected_id[0] != -1 ) {
|
||||||
cargo = ShipVehInfo(selected_id[0])->cargo_type;
|
cargo = ShipVehInfo(selected_id[0])->cargo_type;
|
||||||
refittable = ShipVehInfo(selected_id[0])->refittable;
|
refittable = ShipVehInfo(selected_id[0])->refittable;
|
||||||
}
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
info = &_engine_info[engine_id];
|
info = &_engine_info[engine_id];
|
||||||
|
@ -586,6 +585,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
|
||||||
sel[0]--;
|
sel[0]--;
|
||||||
}
|
}
|
||||||
} while (++engine_id, ++e,--num);
|
} while (++engine_id, ++e,--num);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
} //end of ship
|
} //end of ship
|
||||||
|
|
||||||
|
@ -933,6 +933,7 @@ void ShowReplaceVehicleWindow(byte vehicletype)
|
||||||
w->vscroll.cap = 4;
|
w->vscroll.cap = 4;
|
||||||
WP(w,replaceveh_d).line_height = 24;
|
WP(w,replaceveh_d).line_height = 24;
|
||||||
break;
|
break;
|
||||||
|
default: return;
|
||||||
}
|
}
|
||||||
WP(w,replaceveh_d).vehicletype = vehicletype;
|
WP(w,replaceveh_d).vehicletype = vehicletype;
|
||||||
w->vscroll2.cap = w->vscroll.cap; // these two are always the same
|
w->vscroll2.cap = w->vscroll.cap; // these two are always the same
|
||||||
|
|
1
widget.c
1
widget.c
|
@ -76,6 +76,7 @@ void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y)
|
||||||
pos = x;
|
pos = x;
|
||||||
sb = &w->hscroll;
|
sb = &w->hscroll;
|
||||||
}
|
}
|
||||||
|
default: return; //this should never happen
|
||||||
}
|
}
|
||||||
if (pos <= mi+9) {
|
if (pos <= mi+9) {
|
||||||
// Pressing the upper button?
|
// Pressing the upper button?
|
||||||
|
|
Loading…
Reference in New Issue