Author: sebor Date: Sat Jan 3 16:19:35 2009 New Revision: 731136 URL: http://svn.apache.org/viewvc?rev=731136&view=rev Log: 2009-01-03 Martin Sebor <se...@roguewave.com>
* include/rw/_tree.cc [_RWSTDDEBUG](__rb_tree::insert, __rb_tree::erase): Rewrote a for loop to silence gcc warning: suggest a space before β;β or explicit braces around empty body in βforβ statement. * include/algorithm (find, find_if): Same. * include/algorithm.cc (__unguarded_partition, next_permutation, prev_permutation): Rewrote a while loop to silence said gcc warning. Modified: stdcxx/branches/4.2.x/include/algorithm stdcxx/branches/4.2.x/include/algorithm.cc stdcxx/branches/4.2.x/include/rw/_tree.cc Modified: stdcxx/branches/4.2.x/include/algorithm URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/algorithm?rev=731136&r1=731135&r2=731136&view=diff ============================================================================== --- stdcxx/branches/4.2.x/include/algorithm (original) +++ stdcxx/branches/4.2.x/include/algorithm Sat Jan 3 16:19:35 2009 @@ -93,7 +93,8 @@ { _RWSTD_ASSERT_RANGE (__first, __last); - for (; !(__first == __last) && !(*__first == __val); ++__first); + while (!(__first == __last) && !(*__first == __val)) + ++__first; return __first; } @@ -105,7 +106,8 @@ { _RWSTD_ASSERT_RANGE (__first, __last); - for (; !(__first == __last) && __pred (*__first) == false; ++__first); + while (!(__first == __last) && __pred (*__first) == false) + ++__first; return __first; } Modified: stdcxx/branches/4.2.x/include/algorithm.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/algorithm.cc?rev=731136&r1=731135&r2=731136&view=diff ============================================================================== --- stdcxx/branches/4.2.x/include/algorithm.cc (original) +++ stdcxx/branches/4.2.x/include/algorithm.cc Sat Jan 3 16:19:35 2009 @@ -791,9 +791,10 @@ _RWSTD_ASSERT_RANGE (__first, __last); for ( ; ; ++__first) { - for (; __comp (*__first, __pivot); ++__first); + while (__comp (*__first, __pivot)) + ++__first; - while (__comp (__pivot, *--__last)); + while (__comp (__pivot, *--__last)) { /* no-op */ } if (!(__first < __last)) return __first; @@ -1826,7 +1827,7 @@ _BidirIter __j = __last; - while (__comp (*__i, *--__j) == false); + while (__comp (*__i, *--__j) == false) { /* no-op */ } _STD::iter_swap (__i, __j); @@ -1870,7 +1871,7 @@ _BidirIter __j = __last; - while (__comp (*--__j, *__i) == false); + while (__comp (*--__j, *__i) == false) { /* no-op */ } _STD::iter_swap (__i, __j); Modified: stdcxx/branches/4.2.x/include/rw/_tree.cc URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/include/rw/_tree.cc?rev=731136&r1=731135&r2=731136&view=diff ============================================================================== --- stdcxx/branches/4.2.x/include/rw/_tree.cc (original) +++ stdcxx/branches/4.2.x/include/rw/_tree.cc Sat Jan 3 16:19:35 2009 @@ -338,7 +338,8 @@ { // verify the consistency of the tree size_type __two_logN = 0; - for (size_type __i = size () + 1; __i >>= 1; ++__two_logN); + for (size_type __i = size () + 1; __i >>= 1; ) + ++__two_logN; __two_logN *= 2; @@ -408,7 +409,8 @@ { // verify the consistency of the tree size_type __two_logN = 0; - for (size_type __i = size () + 1; __i >>= 1; ++__two_logN); + for (size_type __i = size () + 1; __i >>= 1; ) + ++__two_logN; __two_logN *= 2; @@ -844,7 +846,8 @@ // return end() __tmp = end (); } else - for (__tmp = end (); !(__first == __last); __tmp = erase (__first++)); + for (__tmp = end (); !(__first == __last); __tmp = erase (__first)) + ++__first; return __tmp; }