vehicle_gui.c
changeset 4835 c885511caff1
parent 4776 c798a32e8bc7
child 4863 c178519a8627
equal deleted inserted replaced
4834:3c6e8a547174 4835:c885511caff1
   514 	const Vehicle* va = *(const Vehicle**)a;
   514 	const Vehicle* va = *(const Vehicle**)a;
   515 	const Vehicle* vb = *(const Vehicle**)b;
   515 	const Vehicle* vb = *(const Vehicle**)b;
   516 	char buf1[64] = "\0";
   516 	char buf1[64] = "\0";
   517 	int r;
   517 	int r;
   518 
   518 
   519 	if (va->string_id != _internal_name_sorter_id) {
   519 	if (va->string_id != _internal_name_sorter_id) GetString(buf1, va->string_id);
   520 		SetDParam(0, va->string_id);
       
   521 		GetString(buf1, STR_JUST_STRING);
       
   522 	}
       
   523 
   520 
   524 	if (vb != _last_vehicle) {
   521 	if (vb != _last_vehicle) {
   525 		_last_vehicle = vb;
   522 		_last_vehicle = vb;
   526 		_bufcache[0] = '\0';
   523 		_bufcache[0] = '\0';
   527 		if (vb->string_id != _internal_name_sorter_id) {
   524 		if (vb->string_id != _internal_name_sorter_id) {
   528 			SetDParam(0, vb->string_id);
   525 			GetString(_bufcache, vb->string_id);
   529 			GetString(_bufcache, STR_JUST_STRING);
       
   530 		}
   526 		}
   531 	}
   527 	}
   532 
   528 
   533 	r =  strcmp(buf1, _bufcache); // sort by name
   529 	r =  strcmp(buf1, _bufcache); // sort by name
   534 
   530