diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-04 17:57:58 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-04 17:57:58 +0000 |
commit | 9380d2815403cc5dff961d465a4ce73799d79b62 (patch) | |
tree | c690f6c1e30886a6b796347c9ca0f62bb8a9e815 /libstdc++-v3/include/bits/vector.tcc | |
parent | 54c88d601c3aa4f03f597d93074d15224b66a490 (diff) | |
download | gcc-9380d2815403cc5dff961d465a4ce73799d79b62.tar.gz |
2004-07-04 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h: Trivial formatting fixes and/or
const-ification of some variables.
* include/bits/deque.tcc: Likewise.
* include/bits/stl_algobase.h: Likewise.
* include/bits/stl_bvector.h: Likewise.
* include/bits/stl_construct.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_pair.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/vector.tcc: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/vector.tcc')
-rw-r--r-- | libstdc++-v3/include/bits/vector.tcc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libstdc++-v3/include/bits/vector.tcc b/libstdc++-v3/include/bits/vector.tcc index 5e8b9a7108d..38401855b98 100644 --- a/libstdc++-v3/include/bits/vector.tcc +++ b/libstdc++-v3/include/bits/vector.tcc @@ -91,7 +91,7 @@ namespace _GLIBCXX_STD vector<_Tp, _Alloc>:: insert(iterator __position, const value_type& __x) { - size_type __n = __position - begin(); + const size_type __n = __position - begin(); if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage && __position == end()) { @@ -193,7 +193,7 @@ namespace _GLIBCXX_STD input_iterator_tag) { iterator __cur(begin()); - for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + for (; __first != __last && __cur != end(); ++__cur, ++__first) *__cur = *__first; if (__first == __last) erase(__cur, end()); @@ -204,11 +204,11 @@ namespace _GLIBCXX_STD template<typename _Tp, typename _Alloc> template<typename _ForwardIterator> void - vector<_Tp,_Alloc>:: + vector<_Tp, _Alloc>:: _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag) { - size_type __len = std::distance(__first, __last); + const size_type __len = std::distance(__first, __last); if (__len > capacity()) { @@ -242,7 +242,7 @@ namespace _GLIBCXX_STD template<typename _Tp, typename _Alloc> void - vector<_Tp,_Alloc>:: + vector<_Tp, _Alloc>:: _M_insert_aux(iterator __position, const _Tp& __x) { if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) @@ -293,7 +293,7 @@ namespace _GLIBCXX_STD template<typename _Tp, typename _Alloc> void - vector<_Tp,_Alloc>:: + vector<_Tp, _Alloc>:: _M_fill_insert(iterator __position, size_type __n, const value_type& __x) { if (__n != 0) @@ -360,11 +360,11 @@ namespace _GLIBCXX_STD template<typename _Tp, typename _Alloc> template<typename _InputIterator> void - vector<_Tp,_Alloc>:: + vector<_Tp, _Alloc>:: _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, input_iterator_tag) { - for ( ; __first != __last; ++__first) + for (; __first != __last; ++__first) { __pos = insert(__pos, *__first); ++__pos; @@ -374,13 +374,13 @@ namespace _GLIBCXX_STD template<typename _Tp, typename _Alloc> template<typename _ForwardIterator> void - vector<_Tp,_Alloc>:: + vector<_Tp, _Alloc>:: _M_range_insert(iterator __position,_ForwardIterator __first, _ForwardIterator __last, forward_iterator_tag) { if (__first != __last) { - size_type __n = std::distance(__first, __last); + const size_type __n = std::distance(__first, __last); if (size_type(this->_M_impl._M_end_of_storage - this->_M_impl._M_finish) >= __n) { |