Author: faridz
Date: Tue Nov 18 07:10:00 2008
New Revision: 718630
URL: http://svn.apache.org/viewvc?rev=718630&view=rev
Log:
2008-11-18 Farid Zaripov <[EMAIL PROTECTED]>
STDCXX-1022
* include/rw/_heap.cc (__make_heap): Optimize the loop with
fixing the ICE on MSVC.
Modified:
stdcxx/trunk/include/rw/_heap.cc
Modified: stdcxx/trunk/include/rw/_heap.cc
URL:
http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_heap.cc?rev=718630&r1=718629&r2=718630&view=diff
==============================================================================
--- stdcxx/trunk/include/rw/_heap.cc (original)
+++ stdcxx/trunk/include/rw/_heap.cc Tue Nov 18 07:10:00 2008
@@ -95,11 +95,10 @@
const _Dist __dist = __last - __first;
- for (_Dist __parent = (__dist - 2) / 2; ; --__parent) {
+ for (_Dist __parent = __dist / 2; 0 < __parent; ) {
+ --__parent;
__adjust_heap (__first, __parent, __dist, *(__first + __parent),
__comp);
- if (__parent == 0)
- return;
}
}