src/sortlist_type.h
changeset 9386 f3fd0650f9d5
parent 9379 2c6c6a0e2233
child 9427 af652de004a0
equal deleted inserted replaced
9385:fb9912284d33 9386:f3fd0650f9d5
   203 		if (!this->IsSortable()) return false;
   203 		if (!this->IsSortable()) return false;
   204 
   204 
   205 		const bool desc = HASBITS(this->flags, VL_DESC);
   205 		const bool desc = HASBITS(this->flags, VL_DESC);
   206 
   206 
   207 		if (HASBITS(this->flags, VL_FIRST_SORT)) {
   207 		if (HASBITS(this->flags, VL_FIRST_SORT)) {
       
   208 			CLRBITS(this->flags, VL_FIRST_SORT);
   208 			qsort(this->data, this->items, sizeof(T), (int (CDECL *)(const void *, const void *))compare);
   209 			qsort(this->data, this->items, sizeof(T), (int (CDECL *)(const void *, const void *))compare);
   209 
   210 
   210 			if (desc) this->Reverse();
   211 			if (desc) this->Reverse();
   211 			return true;
   212 			return true;
   212 		}
   213 		}