diff src/order_cmd.cpp @ 5893:8547517ef719 draft

(svn r8511) -Codechange: make WindowClass an enumerated value.
author rubidium <rubidium@openttd.org>
date Thu, 01 Feb 2007 15:49:12 +0000 (2007-02-01)
parents c44c070c5032
children f4881d5663d1
line wrap: on
line diff
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1131,16 +1131,16 @@
 
 	if (cur != NULL) {
 		/* Delete the vehicle list of shared orders, if any */
-		int window_type = 0;
+		WindowClass window_class = WC_NONE;
 
 		switch (v->type) {
-			case VEH_Train:    window_type = WC_TRAINS_LIST;   break;
-			case VEH_Road:     window_type = WC_ROADVEH_LIST;  break;
-			case VEH_Ship:     window_type = WC_SHIPS_LIST;    break;
-			case VEH_Aircraft: window_type = WC_AIRCRAFT_LIST; break;
 			default: NOT_REACHED();
+			case VEH_Train:    window_class = WC_TRAINS_LIST;   break;
+			case VEH_Road:     window_class = WC_ROADVEH_LIST;  break;
+			case VEH_Ship:     window_class = WC_SHIPS_LIST;    break;
+			case VEH_Aircraft: window_class = WC_AIRCRAFT_LIST; break;
 		}
-		DeleteWindowById(window_type, (cur->index << 16) | (v->type << 11) | VLW_SHARED_ORDERS | v->owner);
+		DeleteWindowById(window_class, (cur->index << 16) | (v->type << 11) | VLW_SHARED_ORDERS | v->owner);
 	}
 
 	while (cur != NULL) {