MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / EngList_Sort

Function EngList_Sort

src/engine_gui.cpp:356–360  ·  view source on GitHub ↗

* Sort all items using quick sort and given 'CompareItems' function * @param el list to be sorted * @param compare function for evaluation of the quicksort */

Source from the content-addressed store, hash-verified

354 * @param compare function for evaluation of the quicksort
355 */
356void EngList_Sort(GUIEngineList &el, EngList_SortTypeFunction compare)
357{
358 if (el.size() < 2) return;
359 std::sort(el.begin(), el.end(), compare);
360}
361
362/**
363 * Sort selected range of items (on indices @ <begin, begin+num_items-1>)

Callers 3

GenerateBuildListMethod · 0.85

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected