3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-07 14:43:23 +00:00

breaking change. Enforce append semantics everywhere for parameter updates #5744

Replace semantics doesn't work with assumptions made elsewhere in code.
The remedy is to apply append (override) semantics for parameter changes.
This commit is contained in:
Nikolaj Bjorner 2021-12-30 19:11:14 -08:00
parent e8833f4dac
commit fc77345bec
53 changed files with 101 additions and 98 deletions

View file

@ -520,7 +520,7 @@ params_ref::~params_ref() {
params_ref::params_ref(params_ref const & p):
m_params(nullptr) {
operator=(p);
set(p);
}
void params_ref::display(std::ostream & out) const {
@ -553,18 +553,18 @@ void params_ref::validate(param_descrs const & p) {
m_params->validate(p);
}
params_ref & params_ref::operator=(params_ref const & p) {
void params_ref::set(params_ref const & p) {
if (p.m_params)
p.m_params->inc_ref();
if (m_params)
m_params->dec_ref();
m_params = p.m_params;
return *this;
}
void params_ref::copy(params_ref const & src) {
if (m_params == nullptr)
operator=(src);
if (m_params == nullptr || m_params->empty())
set(src);
else {
init();
copy_core(src.m_params);