From 1272c559919009017bdbc329f34a0dc706e8277a Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 27 May 2008 12:24:23 +0000 Subject: (svn r13287) -Codechange: move engine list gui code away from engine.cpp (and its headers) to engine_gui.cpp --- src/engine.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/engine.cpp') diff --git a/src/engine.cpp b/src/engine.cpp index 558fcd8e0..c3d1f5185 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -115,34 +115,6 @@ Engine::~Engine() free(this->name); } -/** Sort all items using qsort() and given 'CompareItems' function - * @param el list to be sorted - * @param compare function for evaluation of the quicksort - */ -void EngList_Sort(EngineList *el, EngList_SortTypeFunction compare) -{ - size_t size = el->size(); - /* out-of-bounds access at the next line for size == 0 (even with operator[] at some systems) - * generally, do not sort if there are less than 2 items */ - if (size < 2) return; - qsort(&((*el)[0]), size, sizeof(EngineID), compare); // MorphOS doesn't know vector::at(int) ... -} - -/** Sort selected range of items (on indices @ ) - * @param el list to be sorted - * @param compare function for evaluation of the quicksort - * @param begin start of sorting - * @param num_items count of items to be sorted - */ -void EngList_SortPartial(EngineList *el, EngList_SortTypeFunction compare, uint begin, uint num_items) -{ - assert(begin <= (uint)el->size()); - assert(begin + num_items <= (uint)el->size()); - if (num_items < 2) return; - qsort(&((*el)[begin]), num_items, sizeof(EngineID), compare); -} - - /** Sets cached values in Player::num_vehicles and Group::num_vehicles */ void SetCachedEngineCounts() -- cgit v1.2.3-70-g09d2