3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-06 19:21:22 +00:00

remove using insert_if_not_there2

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-04-25 15:08:51 -07:00
parent 9ea1cf3c5c
commit a884201d62
47 changed files with 172 additions and 208 deletions

View file

@ -60,12 +60,10 @@ class fix_dl_var_tactic : public tactic {
void inc_occ(expr * n, bool nested) {
if (is_uninterp_const(n) && is_arith(n)) {
obj_map<app, unsigned>::obj_map_entry * entry = m_occs.insert_if_not_there2(to_app(n), 0);
entry->get_data().m_value++;
m_occs.insert_if_not_there(to_app(n), 0)++;
if (!nested) {
entry = m_non_nested_occs.insert_if_not_there2(to_app(n), 0);
entry->get_data().m_value++;
m_non_nested_occs.insert_if_not_there(to_app(n), 0)++;
}
}
}

View file

@ -101,9 +101,9 @@ class recover_01_tactic : public tactic {
}
if (x != nullptr) {
var2clauses::obj_map_entry * entry = m_var2clauses.insert_if_not_there2(x, ptr_vector<app>());
if (entry->get_data().m_value.empty() || entry->get_data().m_value.back()->get_num_args() == cls->get_num_args()) {
entry->get_data().m_value.push_back(cls);
auto& value = m_var2clauses.insert_if_not_there(x, ptr_vector<app>());
if (value.empty() || value.back()->get_num_args() == cls->get_num_args()) {
value.push_back(cls);
return true;
}
}