From 8980891b09a48438d295b73cd068b41184aa44a2 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 7 Oct 2005 07:35:15 +0000 Subject: (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants --- aircraft_gui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'aircraft_gui.c') diff --git a/aircraft_gui.c b/aircraft_gui.c index b01b52129..13814a4b8 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -129,7 +129,7 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e) int sel = WP(w,buildtrain_d).sel_index; int pos = w->vscroll.pos; EngineID engine_id = AIRCRAFT_ENGINES_INDEX; - int selected_id = -1; + EngineID selected_id = INVALID_ENGINE; do { if (HASBIT(e->player_avail, _local_player)) { @@ -145,7 +145,7 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e) WP(w,buildtrain_d).sel_engine = selected_id; - if (selected_id != -1) { + if (selected_id != INVALID_ENGINE) { DrawAircraftPurchaseInfo(2, w->widget[4].top + 1, selected_id); } } @@ -162,14 +162,14 @@ static void NewAircraftWndProc(Window *w, WindowEvent *e) } break; case 5: { /* build */ - int sel_eng = WP(w,buildtrain_d).sel_engine; - if (sel_eng != -1) + EngineID sel_eng = WP(w,buildtrain_d).sel_engine; + if (sel_eng != INVALID_ENGINE) DoCommandP(w->window_number, sel_eng, 0, CcBuildAircraft, CMD_BUILD_AIRCRAFT | CMD_MSG(STR_A008_CAN_T_BUILD_AIRCRAFT)); } break; case 6: { /* rename */ - int sel_eng = WP(w,buildtrain_d).sel_engine; - if (sel_eng != -1) { + EngineID sel_eng = WP(w,buildtrain_d).sel_engine; + if (sel_eng != INVALID_ENGINE) { WP(w,buildtrain_d).rename_engine = sel_eng; ShowQueryString(GetCustomEngineName(sel_eng), STR_A039_RENAME_AIRCRAFT_TYPE, 31, 160, w->window_class, w->window_number); -- cgit v1.2.3-54-g00ecf