diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2008-10-17 09:08:02 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-10-17 09:08:02 +0000 |
commit | 27caad2e1e40c12ba53a049609f6cfa08ef16bae (patch) | |
tree | fd7885652f53bf23bb899bf0e9bc07fea58d09e8 | |
parent | 98b932e7c9848949e92cd91eb5024b650aa98bc8 (diff) | |
download | gcc-27caad2e1e40c12ba53a049609f6cfa08ef16bae.tar.gz |
forward_list.tcc (forward_list<>:: _M_initialize_dispatch(_InputIterator, _InputIterator, __false_type)): Simplify.
2008-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/forward_list.tcc (forward_list<>::
_M_initialize_dispatch(_InputIterator, _InputIterator, __false_type)):
Simplify.
From-SVN: r141192
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/forward_list.tcc | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index f9deb3a0cd9..18aa1778d5e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2008-10-17 Paolo Carlini <paolo.carlini@oracle.com> + * include/bits/forward_list.tcc (forward_list<>:: + _M_initialize_dispatch(_InputIterator, _InputIterator, __false_type)): + Simplify. + +2008-10-17 Paolo Carlini <paolo.carlini@oracle.com> + * include/bits/forward_list.h (forward_list<>:: forward_list(size_type)): Tweak, use _Base default constructor. diff --git a/libstdc++-v3/include/bits/forward_list.tcc b/libstdc++-v3/include/bits/forward_list.tcc index f222f703aac..02b1a0d1d42 100644 --- a/libstdc++-v3/include/bits/forward_list.tcc +++ b/libstdc++-v3/include/bits/forward_list.tcc @@ -215,12 +215,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __false_type) { _Fwd_list_node_base* __to = &this->_M_impl._M_head; - _InputIterator __curr = __first; - while (__curr != __last) + for (; __first != __last; ++__first) { - __to->_M_next = this->_M_create_node(*__curr); + __to->_M_next = this->_M_create_node(*__first); __to = __to->_M_next; - ++__curr; } } |