diff --git a/include/cista/containers/hash_storage.h b/include/cista/containers/hash_storage.h index b094b5d6..ab6d3845 100644 --- a/include/cista/containers/hash_storage.h +++ b/include/cista/containers/hash_storage.h @@ -292,8 +292,8 @@ struct hash_storage { } hash_storage& operator=(hash_storage const& other) { + clear(); if (other.size() == 0U) { - clear(); return *this; } for (const auto& v : other) {