Changeset - r171:8ea7276fb57c
[Not reviewed]
master
0 1 0
darkvater - 20 years ago 2004-09-06 21:47:12
darkvater@openttd.org
(svn r172) -Fix: warning fixes (Tron)
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
vehicle_gui.c
Show inline comments
 
@@ -74,8 +74,8 @@ int CDECL VehicleNumberSorter(const void
 
static char _bufcache[64];	// used together with _last_vehicle_idx to hopefully speed up stringsorting
 
int CDECL VehicleNameSorter(const void *a, const void *b)
 
{
 
	const SortStruct *cmp1 = (SortStruct*)a;
 
	const SortStruct *cmp2 = (SortStruct*)b;
 
	const SortStruct *cmp1 = (const SortStruct*)a;
 
	const SortStruct *cmp2 = (const SortStruct*)b;
 
	const Vehicle *va = DEREF_VEHICLE(cmp1->index);
 
	const Vehicle *vb = DEREF_VEHICLE(cmp2->index);
 
	char buf1[64] = "\0";
 
@@ -110,7 +110,7 @@ int CDECL VehicleAgeSorter(const void *a
 
	int r = va->age - vb->age;
 

	
 
	if (r == 0) // if the sorting criteria had the same value, sort by unitnumber
 
	r = va->unitnumber - vb->unitnumber;
 
		r = va->unitnumber - vb->unitnumber;
 

	
 
	return (_internal_sort_order & 1) ? -r : r;
 
}
0 comments (0 inline, 0 general)