aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/stream.h
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-07-13 14:50:11 -0400
committerDeterminant <ted.sybil@gmail.com>2018-07-13 14:50:11 -0400
commitf786c5fcc65722db13bb3c024b825e2ae5de46ee (patch)
tree33551ab56e696ca89f31040a9192d920666182e7 /include/salticidae/stream.h
parentd8e500b2d785b6c8e12ceb25efe68c32aad46a8b (diff)
...
Diffstat (limited to 'include/salticidae/stream.h')
-rw-r--r--include/salticidae/stream.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/salticidae/stream.h b/include/salticidae/stream.h
index 5b7e936..2d0c963 100644
--- a/include/salticidae/stream.h
+++ b/include/salticidae/stream.h
@@ -286,6 +286,11 @@ class _Bits {
load(&*arr.begin(), arr.size());
}
+ _Bits(const _Bits &other): nbits(other.nbits), ndata(other.ndata) {
+ data = new _impl_type[ndata];
+ memmove(data.get(), other.data.get(), ndata * sizeof(_impl_type));
+ }
+
_Bits(const uint8_t *arr, uint32_t len) { load(arr, len); }
_Bits(uint32_t nbits): nbits(nbits) {
ndata = (nbits + bit_per_datum - 1) / bit_per_datum;