From 3fa468ca8d5c825174aaac847a3ffe4ef4ebf0d7 Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 3 Aug 2012 17:15:53 +0000 Subject: [PATCH] *Core: Fix of StableSortCmp typo git-svn-id: svn://ultimatepp.org/upp/trunk@5248 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Algo.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uppsrc/Core/Algo.h b/uppsrc/Core/Algo.h index 7d98e154b..e95d1f659 100644 --- a/uppsrc/Core/Algo.h +++ b/uppsrc/Core/Algo.h @@ -812,7 +812,7 @@ void Sort(I l, I h, const Less& less) int pass = 5; for(;;) { I middle = l + (count >> 1); // get the middle element - OrderIter2__(l, middle, less); // sort l, middle, h-1 + OrderIter2__(l, middle, less); // sort l, middle, h-1 to find median of 3 OrderIter2__(middle, h - 1, less); OrderIter2__(l, middle, less); // median is now in middle IterSwap(l + 1, middle); // move median pivot to l + 1 @@ -931,7 +931,7 @@ template struct StableSortLessCmp_ { const Cmp& cmp; bool operator()(const StableSortItem& a, const StableSortItem& b) const { - int q = SgnCompare(a.value, b.value); + int q = cmp(a.value, b.value); return q ? q < 0 : a.index < b.index; } @@ -973,7 +973,7 @@ struct StdCmp { template void StableSortCmp(T& c) { - StableSort(c.Begin(), c.End(), StdCmp()); + StableSortCmp(c.Begin(), c.End(), StdCmp()); } template