mirror of
https://github.com/Z3Prover/z3
synced 2025-07-31 08:23:17 +00:00
remove using insert_if_not_there2
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9ea1cf3c5c
commit
a884201d62
47 changed files with 172 additions and 208 deletions
|
@ -145,15 +145,13 @@ sort * model::get_uninterpreted_sort(unsigned idx) const {
|
|||
}
|
||||
|
||||
void model::register_usort(sort * s, unsigned usize, expr * const * universe) {
|
||||
sort2universe::obj_map_entry * entry = m_usort2universe.insert_if_not_there2(s, nullptr);
|
||||
ptr_vector<expr>* & u = m_usort2universe.insert_if_not_there(s, nullptr);
|
||||
m.inc_array_ref(usize, universe);
|
||||
ptr_vector<expr> * u = entry->get_data().m_value;
|
||||
if (!u) {
|
||||
m_usorts.push_back(s);
|
||||
m.inc_ref(s);
|
||||
u = alloc(ptr_vector<expr>);
|
||||
u->append(usize, universe);
|
||||
entry->get_data().m_value = u;
|
||||
}
|
||||
else {
|
||||
m.dec_array_ref(u->size(), u->c_ptr());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue