(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to

use in debug.h. grfmsg() is now used as a specific debug-function for grf.
This commit is contained in:
Darkvater
2006-12-26 17:36:18 +00:00
parent 08d0319f7c
commit 04628a1979
63 changed files with 442 additions and 475 deletions

View File

@@ -410,8 +410,7 @@ static void MakeSortedTownList(void)
/* Create array for sorting */
_town_sort = realloc((void*)_town_sort, (GetMaxTownIndex() + 1) * sizeof(_town_sort[0]));
if (_town_sort == NULL)
error("Could not allocate memory for the town-sorting-list");
if (_town_sort == NULL) error("Could not allocate memory for the town-sorting-list");
FOR_ALL_TOWNS(t) _town_sort[n++] = t;
@@ -420,7 +419,7 @@ static void MakeSortedTownList(void)
_last_town = NULL; // used for "cache"
qsort((void*)_town_sort, n, sizeof(_town_sort[0]), _town_sort_order & 2 ? TownPopSorter : TownNameSorter);
DEBUG(misc, 1) ("Resorting Towns list...");
DEBUG(misc, 3, "Resorting towns list");
}