summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/fast_sparse_vector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/fast_sparse_vector.h b/utils/fast_sparse_vector.h
index b9315235..8d381b60 100644
--- a/utils/fast_sparse_vector.h
+++ b/utils/fast_sparse_vector.h
@@ -127,6 +127,7 @@ class FastSparseVector {
}
const FastSparseVector<T>& operator=(const FastSparseVector<T>& other) {
if (&other == this) return *this;
+ clear();
std::memcpy(this, &other, sizeof(FastSparseVector));
if (is_remote_)
data_.rbmap = new std::map<int, T>(*data_.rbmap);