aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1997-11-06 19:21:38 +0000
committerJason Merrill <jason@gcc.gnu.org>1997-11-06 14:21:38 -0500
commit0cdff4f223f93c054db4f879d61c8289e56f1cea (patch)
tree7a05566b585b322f3fabbba703945a954a0f43cd
parent95e8dcbaa0aa8e18cacddf112d443ddf7770bcc7 (diff)
downloadgcc-0cdff4f223f93c054db4f879d61c8289e56f1cea.zip
gcc-0cdff4f223f93c054db4f879d61c8289e56f1cea.tar.gz
gcc-0cdff4f223f93c054db4f879d61c8289e56f1cea.tar.bz2
stl_algo.h, [...]: Update to October 28 SGI release.
* stl_algo.h, stl_algobase.h, stl_bvector.h, stl_deque.h: Update to October 28 SGI release. From-SVN: r16351
-rw-r--r--libstdc++/stl/ChangeLog5
-rw-r--r--libstdc++/stl/stl_algo.h4
-rw-r--r--libstdc++/stl/stl_algobase.h3
-rw-r--r--libstdc++/stl/stl_bvector.h6
-rw-r--r--libstdc++/stl/stl_deque.h2
5 files changed, 15 insertions, 5 deletions
diff --git a/libstdc++/stl/ChangeLog b/libstdc++/stl/ChangeLog
index 7d0c62a..1873c9f 100644
--- a/libstdc++/stl/ChangeLog
+++ b/libstdc++/stl/ChangeLog
@@ -1,3 +1,8 @@
+Thu Nov 6 11:19:09 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * stl_algo.h, stl_algobase.h, stl_bvector.h,
+ stl_deque.h: Update to October 28 SGI release.
+
Sun Nov 2 12:14:56 1997 Jason Merrill <jason@yorick.cygnus.com>
* algo.h, algobase.h, alloc.h, bvector.h, defalloc.h, deque.h,
diff --git a/libstdc++/stl/stl_algo.h b/libstdc++/stl/stl_algo.h
index 6703c2a..53b8dbd 100644
--- a/libstdc++/stl/stl_algo.h
+++ b/libstdc++/stl/stl_algo.h
@@ -2592,7 +2592,7 @@ bool __is_heap(RandomAccessIterator first, RandomAccessIterator last,
for (Distance child = 1; child < n; ++child) {
if (first[parent] < first[child])
return false;
- if (child & 1 == 0)
+ if ((child & 1) == 0)
++parent;
}
return true;
@@ -2616,7 +2616,7 @@ bool __is_heap(RandomAccessIterator first, RandomAccessIterator last,
for (Distance child = 1; child < n; ++child) {
if (comp(first[parent], first[child]))
return false;
- if (child & 1 == 0)
+ if ((child & 1) == 0)
++parent;
}
return true;
diff --git a/libstdc++/stl/stl_algobase.h b/libstdc++/stl/stl_algobase.h
index 668baad..101fea5 100644
--- a/libstdc++/stl/stl_algobase.h
+++ b/libstdc++/stl/stl_algobase.h
@@ -79,6 +79,9 @@ inline void swap(T& a, T& b) {
#ifndef __BORLANDC__
+#undef min
+#undef max
+
template <class T>
inline const T& min(const T& a, const T& b) {
return b < a ? b : a;
diff --git a/libstdc++/stl/stl_bvector.h b/libstdc++/stl/stl_bvector.h
index db02251..00fe500 100644
--- a/libstdc++/stl/stl_bvector.h
+++ b/libstdc++/stl/stl_bvector.h
@@ -565,13 +565,15 @@ public:
void insert(iterator pos, long n, bool x) { insert(pos, (size_type)n, x); }
void pop_back() { --finish; }
- void erase(iterator position) {
+ iterator erase(iterator position) {
if (position + 1 != end())
copy(position + 1, end(), position);
--finish;
+ return position;
}
- void erase(iterator first, iterator last) {
+ iterator erase(iterator first, iterator last) {
finish = copy(last, end(), first);
+ return first;
}
void resize(size_type new_size, bool x = bool()) {
if (new_size < size())
diff --git a/libstdc++/stl/stl_deque.h b/libstdc++/stl/stl_deque.h
index 79d4008..72325d5 100644
--- a/libstdc++/stl/stl_deque.h
+++ b/libstdc++/stl/stl_deque.h
@@ -530,7 +530,7 @@ public: // Erase
iterator next = pos;
++next;
difference_type index = pos - start;
- if (index < size() >> 1) {
+ if (index < (size() >> 1)) {
copy_backward(start, pos, next);
pop_front();
}