diff options
author | Paolo Carlini <pcarlini@suse.de> | 2004-02-03 17:59:05 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2004-02-03 17:59:05 +0000 |
commit | 83042fcaec9b5763ddc895a57c6618afbfc4c897 (patch) | |
tree | 1f4f17dba2c56dfd39a7a0de8f223999c40c45da | |
parent | e621b5885a6108a671b093bcb4770e5020e92f4a (diff) | |
download | gcc-83042fcaec9b5763ddc895a57c6618afbfc4c897.zip gcc-83042fcaec9b5763ddc895a57c6618afbfc4c897.tar.gz gcc-83042fcaec9b5763ddc895a57c6618afbfc4c897.tar.bz2 |
stl_iterator_base_funcs.h: Minor formatting and indentation tweaks.
2004-02-03 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_iterator_base_funcs.h: Minor formatting
and indentation tweaks.
* include/bits/stl_iterator_base_types.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_map.h: Likewise.
* include/bits/stl_tempbuf.h: Likewise.
From-SVN: r77182
-rw-r--r-- | libstdc++-v3/ChangeLog | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_iterator_base_funcs.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_iterator_base_types.h | 9 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_list.h | 21 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_map.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_tempbuf.h | 33 |
6 files changed, 52 insertions, 28 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fcd8a45..c073ca7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,12 @@ +2004-02-03 Paolo Carlini <pcarlini@suse.de> + + * include/bits/stl_iterator_base_funcs.h: Minor formatting + and indentation tweaks. + * include/bits/stl_iterator_base_types.h: Likewise. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_map.h: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + 2004-02-02 Jerry Quinn <jlquinn@optonline.net> * include/bits/gslice.h, include/bits/gslice_array.h, diff --git a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h index c933ee0..b7626d9 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h @@ -137,9 +137,11 @@ namespace std __glibcxx_function_requires(_BidirectionalIteratorConcept< _BidirectionalIterator>) if (__n > 0) - while (__n--) ++__i; + while (__n--) + ++__i; else - while (__n++) --__i; + while (__n++) + --__i; } template<typename _RandomAccessIterator, typename _Distance> diff --git a/libstdc++-v3/include/bits/stl_iterator_base_types.h b/libstdc++-v3/include/bits/stl_iterator_base_types.h index 5054340..c3bb1c5 100644 --- a/libstdc++-v3/include/bits/stl_iterator_base_types.h +++ b/libstdc++-v3/include/bits/stl_iterator_base_types.h @@ -124,7 +124,8 @@ namespace std * provide tighter, more correct semantics. */ template<typename _Iterator> - struct iterator_traits { + struct iterator_traits + { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; @@ -133,7 +134,8 @@ namespace std }; template<typename _Tp> - struct iterator_traits<_Tp*> { + struct iterator_traits<_Tp*> + { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; @@ -142,7 +144,8 @@ namespace std }; template<typename _Tp> - struct iterator_traits<const _Tp*> { + struct iterator_traits<const _Tp*> + { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 546369b..2c6504a 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -76,15 +76,21 @@ namespace __gnu_norm _List_node_base* _M_next; ///< Self-explanatory _List_node_base* _M_prev; ///< Self-explanatory - static void swap(_List_node_base& __x, - _List_node_base& __y); + static void + swap(_List_node_base& __x, _List_node_base& __y); - void transfer(_List_node_base * const __first, - _List_node_base * const __last); + void + transfer(_List_node_base * const __first, + _List_node_base * const __last); - void reverse(); - void hook(_List_node_base * const __position); - void unhook(); + void + reverse(); + + void + hook(_List_node_base * const __position); + + void + unhook(); }; /// @if maint An actual node in the %list. @endif @@ -286,6 +292,7 @@ namespace __gnu_norm // allocator_type and _Node_Alloc_type. The conversion is // required by table 32 in [20.1.5]. typedef typename _Alloc::template rebind<_List_node<_Tp> >::other + _Node_Alloc_type; _List_node_base _M_node; diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 6cb0845..04876ba 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -336,7 +336,7 @@ namespace __gnu_norm iterator __i = lower_bound(__k); // __i->first is greater than or equivalent to __k. if (__i == end() || key_comp()(__k, (*__i).first)) - __i = insert(__i, value_type(__k, mapped_type())); + __i = insert(__i, value_type(__k, mapped_type())); return (*__i).second; } diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index 87080c6..96f9097 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -132,7 +132,9 @@ namespace std private: // Disable copy constructor and assignment operator. _Temporary_buffer(const _Temporary_buffer&); - void operator=(const _Temporary_buffer&); + + void + operator=(const _Temporary_buffer&); }; @@ -140,27 +142,28 @@ namespace std _Temporary_buffer<_ForwardIterator, _Tp>:: _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) : _M_original_len(std::distance(__first, __last)), - _M_len(0) , _M_buffer(0) + _M_len(0), _M_buffer(0) { // Workaround for a __type_traits bug in the pre-7.3 compiler. typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Trivial; try - { - pair<pointer, size_type> __p(get_temporary_buffer<value_type>(_M_original_len)); - _M_buffer = __p.first; - _M_len = __p.second; - if (_M_len > 0) - _M_initialize_buffer(*__first, _Trivial()); - } + { + pair<pointer, size_type> __p(get_temporary_buffer< + value_type>(_M_original_len)); + _M_buffer = __p.first; + _M_len = __p.second; + if (_M_len > 0) + _M_initialize_buffer(*__first, _Trivial()); + } catch(...) - { - std::return_temporary_buffer(_M_buffer); - _M_buffer = 0; - _M_len = 0; - __throw_exception_again; - } + { + std::return_temporary_buffer(_M_buffer); + _M_buffer = 0; + _M_len = 0; + __throw_exception_again; + } } } // namespace std |