mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 21:08:46 +00:00
operator= checks this equality before moving (#5265)
This commit is contained in:
parent
7869cdbbc8
commit
f942c3df91
|
@ -511,9 +511,11 @@ namespace z3 {
|
|||
return *this;
|
||||
}
|
||||
ast & operator=(ast && s) noexcept {
|
||||
object::operator=(std::forward<object>(s));
|
||||
m_ast = s.m_ast;
|
||||
s.m_ast = nullptr;
|
||||
if (this != &s) {
|
||||
object::operator=(std::forward<object>(s));
|
||||
m_ast = s.m_ast;
|
||||
s.m_ast = nullptr;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
Z3_ast_kind kind() const { Z3_ast_kind r = Z3_get_ast_kind(ctx(), m_ast); check_error(); return r; }
|
||||
|
|
Loading…
Reference in a new issue