Changes in directory llvm/include/llvm/ADT:

BitVector.h updated: 1.8 -> 1.9
---
Log message:

Merges two resize() variants.

---
Diffs of the changes:  (+3 -11)

 BitVector.h |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)


Index: llvm/include/llvm/ADT/BitVector.h
diff -u llvm/include/llvm/ADT/BitVector.h:1.8 
llvm/include/llvm/ADT/BitVector.h:1.9
--- llvm/include/llvm/ADT/BitVector.h:1.8       Thu Feb 15 13:10:34 2007
+++ llvm/include/llvm/ADT/BitVector.h   Thu Feb 15 13:12:39 2007
@@ -161,23 +161,15 @@
   }
 
   /// resize - Grow or shrink the bitvector.
-  void resize(unsigned N) {
-    if (N > Capacity * BITS_PER_WORD) {
-      unsigned OldCapacity = Capacity;
-      grow(N);
-      init_words(&Bits[OldCapacity], (Capacity-OldCapacity), false);
-    }
-    Size = N;
-  }
-
-  void resize(unsigned N, bool t) {
+  void resize(unsigned N, bool t = false) {
     if (N > Capacity * BITS_PER_WORD) {
       unsigned OldCapacity = Capacity;
       grow(N);
       init_words(&Bits[OldCapacity], (Capacity-OldCapacity), t);
     }
     Size = N;
-    clear_unused_bits();
+    if (t)
+      clear_unused_bits();
   }
 
   void reserve(unsigned N) {



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to