mirror of
https://github.com/Z3Prover/z3
synced 2025-04-16 05:48:44 +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;
|
return *this;
|
||||||
}
|
}
|
||||||
ast & operator=(ast && s) noexcept {
|
ast & operator=(ast && s) noexcept {
|
||||||
object::operator=(std::forward<object>(s));
|
if (this != &s) {
|
||||||
m_ast = s.m_ast;
|
object::operator=(std::forward<object>(s));
|
||||||
s.m_ast = nullptr;
|
m_ast = s.m_ast;
|
||||||
|
s.m_ast = nullptr;
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
Z3_ast_kind kind() const { Z3_ast_kind r = Z3_get_ast_kind(ctx(), m_ast); check_error(); return r; }
|
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