This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Refactor forward_list
... and this (last one for today, I promise ;)
Paolo.
///////////////
2008-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.tcc (forward_list<>::
_M_initialize_dispatch(_InputIterator, _InputIterator, __false_type)):
Simplify.
Index: include/bits/forward_list.tcc
===================================================================
*** include/bits/forward_list.tcc (revision 141189)
--- include/bits/forward_list.tcc (working copy)
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 215,226 ****
__false_type)
{
_Fwd_list_node_base* __to = &this->_M_impl._M_head;
! _InputIterator __curr = __first;
! while (__curr != __last)
{
! __to->_M_next = this->_M_create_node(*__curr);
__to = __to->_M_next;
- ++__curr;
}
}
--- 215,224 ----
__false_type)
{
_Fwd_list_node_base* __to = &this->_M_impl._M_head;
! for (; __first != __last; ++__first)
{
! __to->_M_next = this->_M_create_node(*__first);
__to = __to->_M_next;
}
}