list.tcc (operator=): Avoid iterator postincrement.
2004-10-07 Paolo Carlini <pcarlini@suse.de> * include/bits/list.tcc (operator=): Avoid iterator postincrement. * include/bits/stl_tree.h (erase(iterator, iterator)): Likewise. From-SVN: r88715
This commit is contained in:
parent
d7d086f086
commit
4681bebd90
|
@ -1,3 +1,8 @@
|
|||
2004-10-07 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/bits/list.tcc (operator=): Avoid iterator postincrement.
|
||||
* include/bits/stl_tree.h (erase(iterator, iterator)): Likewise.
|
||||
|
||||
2004-10-07 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
* include/tr1: New.
|
||||
|
|
|
@ -125,8 +125,9 @@ namespace _GLIBCXX_STD
|
|||
iterator __last1 = end();
|
||||
const_iterator __first2 = __x.begin();
|
||||
const_iterator __last2 = __x.end();
|
||||
while (__first1 != __last1 && __first2 != __last2)
|
||||
*__first1++ = *__first2++;
|
||||
for (; __first1 != __last1 && __first2 != __last2;
|
||||
++__first1, ++__first2)
|
||||
*__first1 = *__first2;
|
||||
if (__first2 == __last2)
|
||||
erase(__first1, __last1);
|
||||
else
|
||||
|
|
|
@ -1087,7 +1087,8 @@ namespace std
|
|||
if (__first == begin() && __last == end())
|
||||
clear();
|
||||
else
|
||||
while (__first != __last) erase(__first++);
|
||||
for (; __first != __last; ++__first)
|
||||
erase(__first);
|
||||
}
|
||||
|
||||
template<typename _Key, typename _Val, typename _KeyOfValue,
|
||||
|
|
Loading…
Reference in New Issue