From fd0f5696a53dd990ff23525ec6eb2576a61e4bfb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 30 Jul 2010 23:24:45 +0000 Subject: SCI: Add comment about stability requirements in makeSortedList. svn-id: r51523 --- engines/sci/graphics/animate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/sci') diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index c637ef8374..a4d07cf4ad 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -177,6 +177,12 @@ void GfxAnimate::makeSortedList(List *list) { curNode = _s->_segMan->lookupNode(curAddress); } + // Possible TODO: As noted in the comment in sortHelper we actually + // require a stable sorting algorithm here. Since Common::sort is not stable + // at the time of writing this comment, we work around that in our ordering + // comparator. If that changes in the future or we want to use some + // stable sorting algorithm here, we should change that. + // Now sort the list according y and z (descending) Common::sort(_list.begin(), _list.end(), sortHelper); } -- cgit v1.2.3