forward_list.tcc (operator==): Use auto.

2008-10-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/forward_list.tcc (operator==): Use auto.

From-SVN: r141173
This commit is contained in:
Paolo Carlini 2008-10-16 14:04:28 +00:00 committed by Paolo Carlini
parent a39562d944
commit 919e5c5edf
2 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2008-10-16 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.tcc (operator==): Use auto.
2008-10-16 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.h (_Fwd_list_base<>::_M_insert_after):

View File

@ -469,7 +469,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
iterator __first = begin();
iterator __last = end();
if (__first == __last)
return;
return;
iterator __next = __first;
while (++__next != __last)
{
@ -518,10 +518,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
{
// We don't have size() so we need to walk through both lists
// making sure both iterators are valid.
typename std::forward_list<_Tp, _Alloc>::const_iterator __ix
= __lx.cbegin();
typename std::forward_list<_Tp, _Alloc>::const_iterator __iy
= __ly.cbegin();
auto __ix = __lx.cbegin();
auto __iy = __ly.cbegin();
while (__ix != __lx.cend() && __iy != __ly.cend())
{
if (*__ix != *__iy)