Mercurial > dedupe
comparison BitDecoder.cpp @ 64:b9515dc35fe4
Make sure no file has greater linewidth than 80.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Fri, 14 Sep 2012 22:50:45 +0200 |
| parents | f8d0ea827db3 |
| children |
comparison
equal
deleted
inserted
replaced
| 63:dd086ec3220d | 64:b9515dc35fe4 |
|---|---|
| 1 #include "BitDecoder.hpp" | 1 #include "BitDecoder.hpp" |
| 2 | 2 |
| 3 #include "Exception/InvalidDataException.hpp" | 3 #include "Exception/InvalidDataException.hpp" |
| 4 | 4 |
| 5 BitDecoder::BitDecoder(BitDecoder* low_in, BitDecoder* high_in) : low(low_in), high(high_in) | 5 BitDecoder::BitDecoder(BitDecoder* low_in, BitDecoder* high_in) |
| 6 : low(low_in), high(high_in) | |
| 6 { | 7 { |
| 7 } | 8 } |
| 8 | 9 |
| 9 BitDecoder::BitDecoder(const QString& d) : low(0), high(0), _data(d) | 10 BitDecoder::BitDecoder(const QString& d) : low(0), high(0), _data(d) |
| 10 { | 11 { |
| 23 | 24 |
| 24 BitDecoder* BitDecoder::merge(BitDecoder* low, BitDecoder* high) | 25 BitDecoder* BitDecoder::merge(BitDecoder* low, BitDecoder* high) |
| 25 { | 26 { |
| 26 return new BitDecoder(low, high); | 27 return new BitDecoder(low, high); |
| 27 } | 28 } |
| 28 | |
| 29 /* | |
| 30 QBitArray BitDecoder::unite(const QBitArray& first, const QBitArray& second) | |
| 31 { | |
| 32 QBitArray result(first.size() + second.size()); | |
| 33 int n = first.size(); | |
| 34 for (int i = 0; i < n; ++i) { | |
| 35 result[i] = first[i]; | |
| 36 } | |
| 37 for (int i = 0; i < second.size(); ++i) { | |
| 38 result[n + i] = second[i]; | |
| 39 } | |
| 40 return result; | |
| 41 } | |
| 42 */ | |
| 43 | 29 |
| 44 QMap<QString, BitArray> BitDecoder::createEncoder() const | 30 QMap<QString, BitArray> BitDecoder::createEncoder() const |
| 45 { | 31 { |
| 46 QMap<QString, BitArray> retVal; | 32 QMap<QString, BitArray> retVal; |
| 47 if (!_data.isNull()) { | 33 if (!_data.isNull()) { |
