summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/deque.tcc
diff options
context:
space:
mode:
authorbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-08 04:46:42 +0000
committerbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>2004-02-08 04:46:42 +0000
commitbae9b8afd8b485fdaf08c319d7380a748c7eb498 (patch)
tree2902b23b00a318ceb938c69b9cdf28cbe0cc2e49 /libstdc++-v3/include/bits/deque.tcc
parentecfd38027f8ef5a27c0c1f9b6c13386bf48b84c2 (diff)
downloadgcc-bae9b8afd8b485fdaf08c319d7380a748c7eb498.tar.gz
Remove trailing whitespace (see ChangeLog for longwinded description).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77479 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/deque.tcc')
-rw-r--r--libstdc++-v3/include/bits/deque.tcc106
1 files changed, 53 insertions, 53 deletions
diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc
index 2f26edfb3af..a30c8516684 100644
--- a/libstdc++-v3/include/bits/deque.tcc
+++ b/libstdc++-v3/include/bits/deque.tcc
@@ -62,7 +62,7 @@
#define _DEQUE_TCC 1
namespace __gnu_norm
-{
+{
template <typename _Tp, typename _Alloc>
deque<_Tp,_Alloc>&
deque<_Tp,_Alloc>::
@@ -82,10 +82,10 @@ namespace __gnu_norm
}
}
return *this;
- }
-
+ }
+
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp,_Alloc>::iterator
deque<_Tp,_Alloc>::
insert(iterator position, const value_type& __x)
{
@@ -104,9 +104,9 @@ namespace __gnu_norm
else
return _M_insert_aux(position, __x);
}
-
+
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp,_Alloc>::iterator
deque<_Tp,_Alloc>::
erase(iterator __position)
{
@@ -125,9 +125,9 @@ namespace __gnu_norm
}
return this->_M_start + __index;
}
-
+
template <typename _Tp, typename _Alloc>
- typename deque<_Tp,_Alloc>::iterator
+ typename deque<_Tp,_Alloc>::iterator
deque<_Tp,_Alloc>::
erase(iterator __first, iterator __last)
{
@@ -160,8 +160,8 @@ namespace __gnu_norm
return this->_M_start + __elems_before;
}
}
-
- template <typename _Tp, typename _Alloc>
+
+ template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
clear()
@@ -173,7 +173,7 @@ namespace __gnu_norm
std::_Destroy(*__node, *__node + _S_buffer_size());
_M_deallocate_node(*__node);
}
-
+
if (this->_M_start._M_node != this->_M_finish._M_node)
{
std::_Destroy(this->_M_start._M_cur, this->_M_start._M_last);
@@ -182,10 +182,10 @@ namespace __gnu_norm
}
else
std::_Destroy(this->_M_start._M_cur, this->_M_finish._M_cur);
-
+
this->_M_finish = this->_M_start;
}
-
+
template <typename _Tp, class _Alloc>
template <typename _InputIterator>
void
@@ -201,7 +201,7 @@ namespace __gnu_norm
else
insert(end(), __first, __last);
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -232,14 +232,14 @@ namespace __gnu_norm
catch(...)
{
_M_destroy_nodes(this->_M_finish._M_node + 1,
- __new_finish._M_node + 1);
+ __new_finish._M_node + 1);
__throw_exception_again;
}
}
- else
+ else
_M_insert_aux(__pos, __n, __x);
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -262,7 +262,7 @@ namespace __gnu_norm
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
template <typename _InputIterator>
void
@@ -282,7 +282,7 @@ namespace __gnu_norm
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
@@ -292,12 +292,12 @@ namespace __gnu_norm
{
const size_type __n = std::distance(__first, __last);
this->_M_initialize_map(__n);
-
+
_Map_pointer __cur_node;
try
{
- for (__cur_node = this->_M_start._M_node;
- __cur_node < this->_M_finish._M_node;
+ for (__cur_node = this->_M_start._M_node;
+ __cur_node < this->_M_finish._M_node;
++__cur_node)
{
_ForwardIterator __mid = __first;
@@ -313,7 +313,7 @@ namespace __gnu_norm
__throw_exception_again;
}
}
-
+
// Called only if _M_finish._M_cur == _M_finish._M_last - 1.
template <typename _Tp, typename _Alloc>
void
@@ -335,7 +335,7 @@ namespace __gnu_norm
__throw_exception_again;
}
}
-
+
// Called only if _M_start._M_cur == _M_start._M_first.
template <typename _Tp, typename _Alloc>
void
@@ -357,8 +357,8 @@ namespace __gnu_norm
_M_deallocate_node(*(this->_M_start._M_node - 1));
__throw_exception_again;
}
- }
-
+ }
+
// Called only if _M_finish._M_cur == _M_finish._M_first.
template <typename _Tp, typename _Alloc>
void deque<_Tp,_Alloc>::
@@ -369,10 +369,10 @@ namespace __gnu_norm
this->_M_finish._M_cur = this->_M_finish._M_last - 1;
std::_Destroy(this->_M_finish._M_cur);
}
-
- // Called only if _M_start._M_cur == _M_start._M_last - 1. Note that
- // if the deque has at least one element (a precondition for this member
- // function), and if _M_start._M_cur == _M_start._M_last, then the deque
+
+ // Called only if _M_start._M_cur == _M_start._M_last - 1. Note that
+ // if the deque has at least one element (a precondition for this member
+ // function), and if _M_start._M_cur == _M_start._M_last, then the deque
// must have at least two nodes.
template <typename _Tp, typename _Alloc>
void deque<_Tp,_Alloc>::
@@ -382,8 +382,8 @@ namespace __gnu_norm
_M_deallocate_node(this->_M_start._M_first);
this->_M_start._M_set_node(this->_M_start._M_node + 1);
this->_M_start._M_cur = this->_M_start._M_first;
- }
-
+ }
+
template <typename _Tp, typename _Alloc>
template <typename _InputIterator>
void
@@ -392,7 +392,7 @@ namespace __gnu_norm
_InputIterator __first, _InputIterator __last,
input_iterator_tag)
{ std::copy(__first, __last, std::inserter(*this, __pos)); }
-
+
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
@@ -434,7 +434,7 @@ namespace __gnu_norm
else
_M_insert_aux(__pos, __first, __last, __n);
}
-
+
template <typename _Tp, typename _Alloc>
typename deque<_Tp, _Alloc>::iterator
deque<_Tp,_Alloc>::
@@ -467,7 +467,7 @@ namespace __gnu_norm
*__pos = __x_copy;
return __pos;
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -495,14 +495,14 @@ namespace __gnu_norm
else
{
std::__uninitialized_copy_fill(this->_M_start, __pos,
- __new_start,
+ __new_start,
this->_M_start, __x_copy);
this->_M_start = __new_start;
std::fill(__old_start, __pos, __x_copy);
}
}
catch(...)
- {
+ {
_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node);
__throw_exception_again;
}
@@ -511,7 +511,7 @@ namespace __gnu_norm
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
iterator __old_finish = this->_M_finish;
- const difference_type __elems_after =
+ const difference_type __elems_after =
difference_type(__length) - __elems_before;
__pos = this->_M_finish - __elems_after;
try
@@ -536,14 +536,14 @@ namespace __gnu_norm
}
}
catch(...)
- {
+ {
_M_destroy_nodes(this->_M_finish._M_node + 1,
__new_finish._M_node + 1);
__throw_exception_again;
}
}
}
-
+
template <typename _Tp, typename _Alloc>
template <typename _ForwardIterator>
void
@@ -563,7 +563,7 @@ namespace __gnu_norm
{
if (__elemsbefore >= difference_type(__n))
{
- iterator __start_n = this->_M_start + difference_type(__n);
+ iterator __start_n = this->_M_start + difference_type(__n);
std::uninitialized_copy(this->_M_start, __start_n,
__new_start);
this->_M_start = __new_start;
@@ -590,7 +590,7 @@ namespace __gnu_norm
{
iterator __new_finish = _M_reserve_elements_at_back(__n);
iterator __old_finish = this->_M_finish;
- const difference_type __elemsafter =
+ const difference_type __elemsafter =
difference_type(__length) - __elemsbefore;
__pos = this->_M_finish - __elemsafter;
try
@@ -624,7 +624,7 @@ namespace __gnu_norm
}
}
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -642,11 +642,11 @@ namespace __gnu_norm
catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
- _M_deallocate_node(*(this->_M_start._M_node - __j));
+ _M_deallocate_node(*(this->_M_start._M_node - __j));
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -664,11 +664,11 @@ namespace __gnu_norm
catch(...)
{
for (size_type __j = 1; __j < __i; ++__j)
- _M_deallocate_node(*(this->_M_finish._M_node + __j));
+ _M_deallocate_node(*(this->_M_finish._M_node + __j));
__throw_exception_again;
}
}
-
+
template <typename _Tp, typename _Alloc>
void
deque<_Tp,_Alloc>::
@@ -677,12 +677,12 @@ namespace __gnu_norm
size_type __old_num_nodes
= this->_M_finish._M_node - this->_M_start._M_node + 1;
size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
-
+
_Map_pointer __new_nstart;
if (this->_M_map_size > 2 * __new_num_nodes)
{
__new_nstart = this->_M_map + (this->_M_map_size
- - __new_num_nodes) / 2
+ - __new_num_nodes) / 2
+ (__add_at_front ? __nodes_to_add : 0);
if (__new_nstart < this->_M_start._M_node)
std::copy(this->_M_start._M_node,
@@ -690,7 +690,7 @@ namespace __gnu_norm
__new_nstart);
else
std::copy_backward(this->_M_start._M_node,
- this->_M_finish._M_node + 1,
+ this->_M_finish._M_node + 1,
__new_nstart + __old_num_nodes);
}
else
@@ -698,7 +698,7 @@ namespace __gnu_norm
size_type __new_map_size = this->_M_map_size
+ std::max(this->_M_map_size,
__nodes_to_add) + 2;
-
+
_Map_pointer __new_map = this->_M_allocate_map(__new_map_size);
__new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+ (__add_at_front ? __nodes_to_add : 0);
@@ -706,11 +706,11 @@ namespace __gnu_norm
this->_M_finish._M_node + 1,
__new_nstart);
_M_deallocate_map(this->_M_map, this->_M_map_size);
-
+
this->_M_map = __new_map;
this->_M_map_size = __new_map_size;
}
-
+
this->_M_start._M_set_node(__new_nstart);
this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
}