diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-07-18 16:53:08 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-07-18 16:53:08 +0000 |
commit | 1c11e200d6d38ba748d164128495d527866cf390 (patch) | |
tree | 4099bcba6a389536f5c9304a979053f857431be3 /gnu/egcs/libstdc++/stl | |
parent | 8f8f7b7e65ede5d1f2b0691e27623d08f1f2c12c (diff) |
Update to 990629 snapshot
closer to gcc 2.95 release.
Diffstat (limited to 'gnu/egcs/libstdc++/stl')
-rw-r--r-- | gnu/egcs/libstdc++/stl/ChangeLog | 10 | ||||
-rw-r--r-- | gnu/egcs/libstdc++/stl/stl_algo.h | 4 | ||||
-rw-r--r-- | gnu/egcs/libstdc++/stl/stl_queue.h | 82 |
3 files changed, 53 insertions, 43 deletions
diff --git a/gnu/egcs/libstdc++/stl/ChangeLog b/gnu/egcs/libstdc++/stl/ChangeLog index f23f4fb1937..32bb031df8c 100644 --- a/gnu/egcs/libstdc++/stl/ChangeLog +++ b/gnu/egcs/libstdc++/stl/ChangeLog @@ -1,3 +1,13 @@ +1999-06-18 Martin von Löwis <loewis@informatik.hu-berlin.de> + + * stl_queue.h: Rename _M_c to c, and _M_comp to comp. + +1999-06-17 Alexandre Oliva <oliva@dcc.unicamp.br> + + * stl_algo.h (transform): Rename __opr to __oper, as __opr is used + internally by egcs. + Reported by Harri Porten <porten@tu-harburg.de> + 1999-05-17 Mark Kettenis <kettenis@gnu.org> * stl_config.h: Only define __STL_PTHREADS with GLIBC >= 2 for diff --git a/gnu/egcs/libstdc++/stl/stl_algo.h b/gnu/egcs/libstdc++/stl/stl_algo.h index 57607ba5d49..e9beaee15f1 100644 --- a/gnu/egcs/libstdc++/stl/stl_algo.h +++ b/gnu/egcs/libstdc++/stl/stl_algo.h @@ -446,9 +446,9 @@ _ForwardIter2 swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, template <class _InputIter, class _OutputIter, class _UnaryOperation> _OutputIter transform(_InputIter __first, _InputIter __last, - _OutputIter __result, _UnaryOperation __opr) { + _OutputIter __result, _UnaryOperation __oper) { for ( ; __first != __last; ++__first, ++__result) - *__result = __opr(*__first); + *__result = __oper(*__first); return __result; } diff --git a/gnu/egcs/libstdc++/stl/stl_queue.h b/gnu/egcs/libstdc++/stl/stl_queue.h index 489cc4ac442..c1e2b698440 100644 --- a/gnu/egcs/libstdc++/stl/stl_queue.h +++ b/gnu/egcs/libstdc++/stl/stl_queue.h @@ -49,33 +49,33 @@ public: typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; protected: - _Sequence _M_c; + _Sequence c; public: - queue() : _M_c() {} - explicit queue(const _Sequence& __c) : _M_c(__c) {} - - bool empty() const { return _M_c.empty(); } - size_type size() const { return _M_c.size(); } - reference front() { return _M_c.front(); } - const_reference front() const { return _M_c.front(); } - reference back() { return _M_c.back(); } - const_reference back() const { return _M_c.back(); } - void push(const value_type& __x) { _M_c.push_back(__x); } - void pop() { _M_c.pop_front(); } + queue() : c() {} + explicit queue(const _Sequence& __c) : c(__c) {} + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + reference front() { return c.front(); } + const_reference front() const { return c.front(); } + reference back() { return c.back(); } + const_reference back() const { return c.back(); } + void push(const value_type& __x) { c.push_back(__x); } + void pop() { c.pop_front(); } }; template <class _Tp, class _Sequence> bool operator==(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) { - return __x._M_c == __y._M_c; + return __x.c == __y.c; } template <class _Tp, class _Sequence> bool operator<(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y) { - return __x._M_c < __y._M_c; + return __x.c < __y.c; } #ifdef __STL_FUNCTION_TMPL_PARTIAL_ORDER @@ -125,69 +125,69 @@ public: typedef typename _Sequence::reference reference; typedef typename _Sequence::const_reference const_reference; protected: - _Sequence _M_c; - _Compare _M_comp; + _Sequence c; + _Compare comp; public: - priority_queue() : _M_c() {} - explicit priority_queue(const _Compare& __x) : _M_c(), _M_comp(__x) {} + priority_queue() : c() {} + explicit priority_queue(const _Compare& __x) : c(), comp(__x) {} priority_queue(const _Compare& __x, const _Sequence& __s) - : _M_c(__s), _M_comp(__x) - { make_heap(_M_c.begin(), _M_c.end(), _M_comp); } + : c(__s), comp(__x) + { make_heap(c.begin(), c.end(), comp); } #ifdef __STL_MEMBER_TEMPLATES template <class _InputIterator> priority_queue(_InputIterator __first, _InputIterator __last) - : _M_c(__first, __last) { make_heap(_M_c.begin(), _M_c.end(), _M_comp); } + : c(__first, __last) { make_heap(c.begin(), c.end(), comp); } template <class _InputIterator> priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x) - : _M_c(__first, __last), _M_comp(__x) - { make_heap(_M_c.begin(), _M_c.end(), _M_comp); } + : c(__first, __last), comp(__x) + { make_heap(c.begin(), c.end(), comp); } template <class _InputIterator> priority_queue(_InputIterator __first, _InputIterator __last, const _Compare& __x, const _Sequence& __s) - : _M_c(__s), _M_comp(__x) + : c(__s), comp(__x) { - _M_c.insert(_M_c.end(), __first, __last); - make_heap(_M_c.begin(), _M_c.end(), _M_comp); + c.insert(c.end(), __first, __last); + make_heap(c.begin(), c.end(), comp); } #else /* __STL_MEMBER_TEMPLATES */ priority_queue(const value_type* __first, const value_type* __last) - : _M_c(__first, __last) { make_heap(_M_c.begin(), _M_c.end(), _M_comp); } + : c(__first, __last) { make_heap(c.begin(), c.end(), comp); } priority_queue(const value_type* __first, const value_type* __last, const _Compare& __x) - : _M_c(__first, __last), _M_comp(__x) - { make_heap(_M_c.begin(), _M_c.end(), _M_comp); } + : c(__first, __last), comp(__x) + { make_heap(c.begin(), c.end(), comp); } priority_queue(const value_type* __first, const value_type* __last, const _Compare& __x, const _Sequence& __c) - : _M_c(__c), _M_comp(__x) + : c(__c), comp(__x) { - _M_c.insert(_M_c.end(), __first, __last); - make_heap(_M_c.begin(), _M_c.end(), _M_comp); + c.insert(c.end(), __first, __last); + make_heap(c.begin(), c.end(), comp); } #endif /* __STL_MEMBER_TEMPLATES */ - bool empty() const { return _M_c.empty(); } - size_type size() const { return _M_c.size(); } - const_reference top() const { return _M_c.front(); } + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + const_reference top() const { return c.front(); } void push(const value_type& __x) { __STL_TRY { - _M_c.push_back(__x); - push_heap(_M_c.begin(), _M_c.end(), _M_comp); + c.push_back(__x); + push_heap(c.begin(), c.end(), comp); } - __STL_UNWIND(_M_c.clear()); + __STL_UNWIND(c.clear()); } void pop() { __STL_TRY { - pop_heap(_M_c.begin(), _M_c.end(), _M_comp); - _M_c.pop_back(); + pop_heap(c.begin(), c.end(), comp); + c.pop_back(); } - __STL_UNWIND(_M_c.clear()); + __STL_UNWIND(c.clear()); } }; |