Commit 98aff0b5 by Jeffrey Oldham Committed by Jeffrey D. Oldham

ropeimpl.h (_Rope_RopeRep::_M_free_c_string): Replace destroy by _Destroy.

2001-07-04  Jeffrey Oldham  <oldham@codesourcery.com>

	* include/ext/ropeimpl.h (_Rope_RopeRep::_M_free_c_string):
	Replace destroy by _Destroy.
	(_Rope_RopeRep::_S_free_string): Likewise.
	(rope::c_str()): Likewise.
	* include/ext/slist (_Slist_base::_M_erase_after>): Likewise.
	(_Slist_base::_M_erase_after): Likewise.
	(slist::_M_create_node): Replace construct by _Construct.
	(slist::pop_front): Replace destroy by _Destroy.
	* include/ext/stl_hashtable.h (hashtable::_M_new_node): Replace
	construct by _Construct.
	(hashtable::_M_delete_node): Replace destroy by _Destroy.
	* include/ext/stl_rope.h (rope::rope): Replace construct by
	_Construct.
	(rope::copy): Replace destroy by _Destroy.

From-SVN: r43764
parent 84a5b4f8
2001-07-04 Jeffrey Oldham <oldham@codesourcery.com>
* include/ext/ropeimpl.h (_Rope_RopeRep::_M_free_c_string):
Replace destroy by _Destroy.
(_Rope_RopeRep::_S_free_string): Likewise.
(rope::c_str()): Likewise.
* include/ext/slist (_Slist_base::_M_erase_after>): Likewise.
(_Slist_base::_M_erase_after): Likewise.
(slist::_M_create_node): Replace construct by _Construct.
(slist::pop_front): Replace destroy by _Destroy.
* include/ext/stl_hashtable.h (hashtable::_M_new_node): Replace
construct by _Construct.
(hashtable::_M_delete_node): Replace destroy by _Destroy.
* include/ext/stl_rope.h (rope::rope): Replace construct by
_Construct.
(rope::copy): Replace destroy by _Destroy.
2001-07-03 Benjamin Kosnik <bkoz@redhat.com> 2001-07-03 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/localefwd.h: Format. * include/bits/localefwd.h: Format.
......
...@@ -317,7 +317,7 @@ inline void _Rope_RopeRep<_CharT,_Alloc>::_M_free_c_string() ...@@ -317,7 +317,7 @@ inline void _Rope_RopeRep<_CharT,_Alloc>::_M_free_c_string()
_CharT* __cstr = _M_c_string; _CharT* __cstr = _M_c_string;
if (0 != __cstr) { if (0 != __cstr) {
size_t __size = _M_size + 1; size_t __size = _M_size + 1;
destroy(__cstr, __cstr + __size); _Destroy(__cstr, __cstr + __size);
_Data_deallocate(__cstr, __size); _Data_deallocate(__cstr, __size);
} }
} }
...@@ -329,7 +329,7 @@ template <class _CharT, class _Alloc> ...@@ -329,7 +329,7 @@ template <class _CharT, class _Alloc>
allocator_type __a) allocator_type __a)
{ {
if (!_S_is_basic_char_type((_CharT*)0)) { if (!_S_is_basic_char_type((_CharT*)0)) {
destroy(__s, __s + __n); _Destroy(__s, __s + __n);
} }
// This has to be a static member, so this gets a bit messy // This has to be a static member, so this gets a bit messy
__a.deallocate( __a.deallocate(
...@@ -1453,7 +1453,7 @@ const _CharT* rope<_CharT,_Alloc>::c_str() const { ...@@ -1453,7 +1453,7 @@ const _CharT* rope<_CharT,_Alloc>::c_str() const {
// It must have been added in the interim. Hence it had to have been // It must have been added in the interim. Hence it had to have been
// separately allocated. Deallocate the old copy, since we just // separately allocated. Deallocate the old copy, since we just
// replaced it. // replaced it.
destroy(__old_c_string, __old_c_string + __s + 1); _Destroy(__old_c_string, __old_c_string + __s + 1);
_Data_deallocate(__old_c_string, __s + 1); _Data_deallocate(__old_c_string, __s + 1);
} }
# endif # endif
......
...@@ -265,7 +265,7 @@ protected: ...@@ -265,7 +265,7 @@ protected:
_Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next); _Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next);
_Slist_node_base* __next_next = __next->_M_next; _Slist_node_base* __next_next = __next->_M_next;
__pos->_M_next = __next_next; __pos->_M_next = __next_next;
destroy(&__next->_M_data); _Destroy(&__next->_M_data);
_M_put_node(__next); _M_put_node(__next);
return __next_next; return __next_next;
} }
...@@ -280,7 +280,7 @@ _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, ...@@ -280,7 +280,7 @@ _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
while (__cur != __last_node) { while (__cur != __last_node) {
_Slist_node<_Tp>* __tmp = __cur; _Slist_node<_Tp>* __tmp = __cur;
__cur = (_Slist_node<_Tp>*) __cur->_M_next; __cur = (_Slist_node<_Tp>*) __cur->_M_next;
destroy(&__tmp->_M_data); _Destroy(&__tmp->_M_data);
_M_put_node(__tmp); _M_put_node(__tmp);
} }
__before_first->_M_next = __last_node; __before_first->_M_next = __last_node;
...@@ -318,7 +318,7 @@ private: ...@@ -318,7 +318,7 @@ private:
_Node* _M_create_node(const value_type& __x) { _Node* _M_create_node(const value_type& __x) {
_Node* __node = this->_M_get_node(); _Node* __node = this->_M_get_node();
__STL_TRY { __STL_TRY {
construct(&__node->_M_data, __x); _Construct(&__node->_M_data, __x);
__node->_M_next = 0; __node->_M_next = 0;
} }
__STL_UNWIND(this->_M_put_node(__node)); __STL_UNWIND(this->_M_put_node(__node));
...@@ -328,7 +328,7 @@ private: ...@@ -328,7 +328,7 @@ private:
_Node* _M_create_node() { _Node* _M_create_node() {
_Node* __node = this->_M_get_node(); _Node* __node = this->_M_get_node();
__STL_TRY { __STL_TRY {
construct(&__node->_M_data); _Construct(&__node->_M_data);
__node->_M_next = 0; __node->_M_next = 0;
} }
__STL_UNWIND(this->_M_put_node(__node)); __STL_UNWIND(this->_M_put_node(__node));
...@@ -425,7 +425,7 @@ public: ...@@ -425,7 +425,7 @@ public:
void pop_front() { void pop_front() {
_Node* __node = (_Node*) this->_M_head._M_next; _Node* __node = (_Node*) this->_M_head._M_next;
this->_M_head._M_next = __node->_M_next; this->_M_head._M_next = __node->_M_next;
destroy(&__node->_M_data); _Destroy(&__node->_M_data);
this->_M_put_node(__node); this->_M_put_node(__node);
} }
......
...@@ -517,7 +517,7 @@ private: ...@@ -517,7 +517,7 @@ private:
_Node* __n = _M_get_node(); _Node* __n = _M_get_node();
__n->_M_next = 0; __n->_M_next = 0;
__STL_TRY { __STL_TRY {
construct(&__n->_M_val, __obj); _Construct(&__n->_M_val, __obj);
return __n; return __n;
} }
__STL_UNWIND(_M_put_node(__n)); __STL_UNWIND(_M_put_node(__n));
...@@ -525,7 +525,7 @@ private: ...@@ -525,7 +525,7 @@ private:
void _M_delete_node(_Node* __n) void _M_delete_node(_Node* __n)
{ {
destroy(&__n->_M_val); _Destroy(&__n->_M_val);
_M_put_node(__n); _M_put_node(__n);
} }
......
...@@ -1540,7 +1540,7 @@ class rope : public _Rope_base<_CharT,_Alloc> { ...@@ -1540,7 +1540,7 @@ class rope : public _Rope_base<_CharT,_Alloc> {
{ {
_CharT* __buf = _Data_allocate(_S_rounded_up_size(1)); _CharT* __buf = _Data_allocate(_S_rounded_up_size(1));
construct(__buf, __c); _Construct(__buf, __c);
__STL_TRY { __STL_TRY {
_M_tree_ptr = _S_new_RopeLeaf(__buf, 1, __a); _M_tree_ptr = _S_new_RopeLeaf(__buf, 1, __a);
} }
...@@ -1642,7 +1642,7 @@ class rope : public _Rope_base<_CharT,_Alloc> { ...@@ -1642,7 +1642,7 @@ class rope : public _Rope_base<_CharT,_Alloc> {
} }
void copy(_CharT* __buffer) const { void copy(_CharT* __buffer) const {
destroy(__buffer, __buffer + size()); _Destroy(__buffer, __buffer + size());
_S_flatten(_M_tree_ptr, __buffer); _S_flatten(_M_tree_ptr, __buffer);
} }
...@@ -1656,7 +1656,7 @@ class rope : public _Rope_base<_CharT,_Alloc> { ...@@ -1656,7 +1656,7 @@ class rope : public _Rope_base<_CharT,_Alloc> {
size_t __size = size(); size_t __size = size();
size_t __len = (__pos + __n > __size? __size - __pos : __n); size_t __len = (__pos + __n > __size? __size - __pos : __n);
destroy(__buffer, __buffer + __len); _Destroy(__buffer, __buffer + __len);
_S_flatten(_M_tree_ptr, __pos, __len, __buffer); _S_flatten(_M_tree_ptr, __pos, __len, __buffer);
return __len; return __len;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment