Mercurial > dedupe
comparison BitArray.cpp @ 65:bc55cbd827bf
Compile fix.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Sun, 23 Dec 2012 22:04:55 +0100 |
| parents | b9515dc35fe4 |
| children |
comparison
equal
deleted
inserted
replaced
| 64:b9515dc35fe4 | 65:bc55cbd827bf |
|---|---|
| 1 #include "BitArray.hpp" | 1 #include "BitArray.hpp" |
| 2 | |
| 3 #include <cstring> | |
| 2 | 4 |
| 3 BitArray::~BitArray() | 5 BitArray::~BitArray() |
| 4 { | 6 { |
| 5 delete bits; | 7 delete bits; |
| 6 } | 8 } |
| 7 | 9 |
| 8 BitArray::BitArray(const BitArray& other) | 10 BitArray::BitArray(const BitArray& other) |
| 9 : size_(other.size()), bits(new uchar[NUMCHARS(size_)]) | 11 : size_(other.size()), bits(new uchar[NUMCHARS(size_)]) |
| 10 { | 12 { |
| 11 memcpy(bits, other.bits, NUMCHARS(size_)); | 13 std::memcpy(bits, other.bits, NUMCHARS(size_)); |
| 12 } | 14 } |
| 13 | 15 |
| 14 BitArray& BitArray::operator=(const BitArray& other) | 16 BitArray& BitArray::operator=(const BitArray& other) |
| 15 { | 17 { |
| 16 if (NUMCHARS(size_) != NUMCHARS(other.size_)) { | 18 if (NUMCHARS(size_) != NUMCHARS(other.size_)) { |
