summaryrefslogtreecommitdiff
path: root/decoder/small_vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/small_vector.h')
-rw-r--r--decoder/small_vector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/small_vector.h b/decoder/small_vector.h
index 4183cde2..7ed99e77 100644
--- a/decoder/small_vector.h
+++ b/decoder/small_vector.h
@@ -57,7 +57,8 @@ class SmallVector {
SmallVector(const Self& o) : size_(o.size_) {
if (size_ <= SV_MAX) {
- for (int i = 0; i < SV_MAX; ++i) data_.vals[i] = o.data_.vals[i];
+ std::memcpy(data_.vals,o.data_.vals,size_*sizeof(T));
+// for (int i = 0; i < size_; ++i) data_.vals[i] = o.data_.vals[i];
} else {
capacity_ = size_ = o.size_;
data_.ptr = new T[capacity_];