File diff r8963:f346663a84f1 → r8964:d804b28173fd
src/station_gui.cpp
Show inline comments
 
@@ -102,7 +102,6 @@ static int CDECL StationNameSorter(const
 
	const Station* st1 = *(const Station**)a;
 
	const Station* st2 = *(const Station**)b;
 
	char buf1[64];
 
	int r;
 

	
 
	SetDParam(0, st1->index);
 
	GetString(buf1, STR_STATION, lastof(buf1));
 
@@ -113,7 +112,7 @@ static int CDECL StationNameSorter(const
 
		GetString(_bufcache, STR_STATION, lastof(_bufcache));
 
	}
 

	
 
	r = strcmp(buf1, _bufcache); // sort by name
 
	int r = strcmp(buf1, _bufcache); // sort by name
 
	return (_internal_sort_order & 1) ? -r : r;
 
}
 

	
 
@@ -124,7 +123,7 @@ static int CDECL StationTypeSorter(const
 
	return (_internal_sort_order & 1) ? st2->facilities - st1->facilities : st1->facilities - st2->facilities;
 
}
 

	
 
static const uint32 _cargo_filter_max = ~0;
 
static const uint32 _cargo_filter_max = UINT32_MAX;
 
static uint32 _cargo_filter = _cargo_filter_max;
 

	
 
static int CDECL StationWaitingSorter(const void *a, const void *b)
 
@@ -750,9 +749,6 @@ static void DrawStationViewWindow(Window
 
{
 
	StationID station_id = w->window_number;
 
	const Station* st = GetStation(station_id);
 
	int x, y;     ///< coordinates used for printing waiting/accepted/rating of cargo
 
	int pos;      ///< = w->vscroll.pos
 
	StringID str;
 
	CargoDataList cargolist;
 
	uint32 transfers = 0;
 

	
 
@@ -808,13 +804,15 @@ static void DrawStationViewWindow(Window
 
	SetDParam(1, st->facilities);
 
	DrawWindowWidgets(w);
 

	
 
	x = 2;
 
	y = 15;
 
	pos = w->vscroll.pos;
 
	int x = 2;  ///< coordinates used for printing waiting/accepted/rating of cargo
 
	int y = 15;
 
	int pos = w->vscroll.pos; ///< = w->vscroll.pos
 

	
 
	uint width = w->widget[SVW_WAITING].right - w->widget[SVW_WAITING].left - 4;
 
	int maxrows = w->vscroll.cap;
 

	
 
	StringID str;
 

	
 
	if (--pos < 0) {
 
		str = STR_00D0_NOTHING;
 
		for (CargoID i = 0; i < NUM_CARGO; i++) {