equal
deleted
inserted
replaced
212 * @param begin start of sorting |
212 * @param begin start of sorting |
213 * @param num_items count of items to be sorted |
213 * @param num_items count of items to be sorted |
214 */ |
214 */ |
215 void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items) |
215 void EngList_SortPartial(GUIEngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items) |
216 { |
216 { |
|
217 if (num_items < 2) return; |
217 assert(begin < el->Length()); |
218 assert(begin < el->Length()); |
218 assert(begin + num_items <= el->Length()); |
219 assert(begin + num_items <= el->Length()); |
219 if (num_items < 2) return; |
|
220 qsort(el->Get(begin), num_items, sizeof(*el->Begin()), compare); |
220 qsort(el->Get(begin), num_items, sizeof(*el->Begin()), compare); |
221 } |
221 } |
222 |
222 |