]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stl_algo.h, [...]: Update to October 28 SGI release.
authorJason Merrill <jason@yorick.cygnus.com>
Thu, 6 Nov 1997 19:21:18 +0000 (19:21 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 6 Nov 1997 19:21:18 +0000 (14:21 -0500)
* stl_algo.h, stl_algobase.h, stl_bvector.h,
  stl_deque.h: Update to October 28 SGI release.

From-SVN: r16350

libstdc++/stl/ChangeLog
libstdc++/stl/stl_algo.h
libstdc++/stl/stl_algobase.h
libstdc++/stl/stl_bvector.h
libstdc++/stl/stl_deque.h

index 7d0c62ab462ebca75ef76bb48ca19d18b13042ce..1873c9f7e4bf8f1316ee83379a0710f69ff959a0 100644 (file)
@@ -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,
index 6703c2aa7a8eca380c9058f207adc7266b73339b..53b8dbd13a4107b8cd59bce544182292914c0475 100644 (file)
@@ -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;
index 668baad8d6b6ebfe11eb931976f683a893336f82..101fea53af86b2e20cc5a1d95d1fdd9402c7ab6b 100644 (file)
@@ -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;
index db02251facdb01efde60e0f0fba3ce0b22b0b044..00fe500bfdfa5dc2788c9ff4a5c1b8c460046746 100644 (file)
@@ -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()) 
index 79d40082f768aad4b58a2625d8d2a7c11ad6332c..72325d5c61c061cf46d67a18f157c0bbcb34a4e5 100644 (file)
@@ -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();
     }