aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2010-07-30 23:24:45 +0000
committerJohannes Schickel2010-07-30 23:24:45 +0000
commitfd0f5696a53dd990ff23525ec6eb2576a61e4bfb (patch)
treefc531f3e994cd56d6a3a6f31f1bc263ea8851b1b /engines
parent8e8023d7cc24991f5ccf86734a8f95da6ac92f50 (diff)
downloadscummvm-rg350-fd0f5696a53dd990ff23525ec6eb2576a61e4bfb.tar.gz
scummvm-rg350-fd0f5696a53dd990ff23525ec6eb2576a61e4bfb.tar.bz2
scummvm-rg350-fd0f5696a53dd990ff23525ec6eb2576a61e4bfb.zip
SCI: Add comment about stability requirements in makeSortedList.
svn-id: r51523
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/animate.cpp6
1 files changed, 6 insertions, 0 deletions
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);
}