changeset 54:f339499ecd79

Remove multiplexing. Comment on defines which should be removed from header.
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Thu, 13 Sep 2012 23:40:46 +0200
parents bd7ca4ceefec
children 19b2a2d98788
files BitArray.hpp
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/BitArray.hpp	Thu Sep 13 23:36:16 2012 +0200
+++ b/BitArray.hpp	Thu Sep 13 23:40:46 2012 +0200
@@ -1,20 +1,15 @@
 #ifndef BITARRAY_HPP
 #define BITARRAY_HPP
 
-
-#if 0
-#include <QtCore/QBitArray>
-typedef QBitArray BitArray;
-#else
 #include <ostream>
 
+//We should remove these defines from the header, but we keep them for
+//now until we have stabilized the API and removed any bugs.
 #define HIGH(B) ((B) >> 3)
 #define LOW(B) ((B) & 0x07)
-
 #define MASK(X) (0x1 << (7 - X))
 #define SELECTMASK(X) (uchar(MASK(X)))
 #define DESELECTMASK(X) (uchar(~MASK(X)))
-
 #define NUMCHARS(X) HIGH(X + 7)
 
 #include <cassert>
@@ -38,6 +33,8 @@
 
   BitArray(uint size) : size_(size), bits(new uchar[NUMCHARS(size)])
   {
+    //We need to initialize the bits beyond size, since they are
+    //implicitly used in certain functions.
     bits[NUMCHARS(size) - 1] = 0;
   }
 
@@ -89,6 +86,4 @@
 
 std::ostream& operator<<(std::ostream& out, const BitArray& rhs);
 
-#endif
-
 #endif //BITARRAY_HPP