From a1d484c4a8560534874c0eeb31b59fd96393780e Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Mon, 9 Feb 2026 19:41:26 +0000 Subject: [PATCH] move, dont copy --- src/util/hashtable.h | 7 +++++++ src/util/s_integer.h | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/util/hashtable.h b/src/util/hashtable.h index 70f0d7085..6ca04b0d7 100644 --- a/src/util/hashtable.h +++ b/src/util/hashtable.h @@ -636,6 +636,13 @@ public: return *this; } + core_hashtable& operator=(core_hashtable && other) { + if (this == &other) return *this; + delete_table(); + std::swap(*this, other); + return *this; + } + #ifdef Z3DEBUG bool check_invariant() { // The capacity must always be a power of two. diff --git a/src/util/s_integer.h b/src/util/s_integer.h index 7d17f6f22..5accf7b4b 100644 --- a/src/util/s_integer.h +++ b/src/util/s_integer.h @@ -34,10 +34,6 @@ public: struct hash_proc { unsigned operator()(s_integer const& r) const { return r.hash(); } }; struct eq_proc { bool operator()(s_integer const& r1, s_integer const& r2) const { return r1 == r2; } }; - void swap(s_integer & n) noexcept { - std::swap(m_val, n.m_val); - } - std::string to_string() const; public: