Changeset - r9386:2ccb6c5a3aae
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-05-27 19:58:32
smatz@openttd.org
(svn r13296) -Fix (r13276): VL_FIRST_SORT was never reset
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/sortlist_type.h
Show inline comments
 
@@ -202,12 +202,13 @@ public:
 
		/* Do not sort when the list is not sortable */
 
		if (!this->IsSortable()) return false;
 

	
 
		const bool desc = HASBITS(this->flags, VL_DESC);
 

	
 
		if (HASBITS(this->flags, VL_FIRST_SORT)) {
 
			CLRBITS(this->flags, VL_FIRST_SORT);
 
			qsort(this->data, this->items, sizeof(T), (int (CDECL *)(const void *, const void *))compare);
 

	
 
			if (desc) this->Reverse();
 
			return true;
 
		}
 

	
0 comments (0 inline, 0 general)