3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-12 02:04:43 +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

@ -68,39 +68,39 @@ public:
void update_signed_lower(app * v, numeral const & k) {
// k <= v
obj_map<app, numeral>::obj_map_entry * entry = m_signed_lowers.insert_if_not_there2(v, k);
if (entry->get_data().m_value < k) {
auto& value = m_signed_lowers.insert_if_not_there(v, k);
if (value < k) {
// improve bound
entry->get_data().m_value = k;
value = k;
}
}
void update_signed_upper(app * v, numeral const & k) {
// v <= k
obj_map<app, numeral>::obj_map_entry * entry = m_signed_uppers.insert_if_not_there2(v, k);
if (k < entry->get_data().m_value) {
auto& value = m_signed_uppers.insert_if_not_there(v, k);
if (k < value) {
// improve bound
entry->get_data().m_value = k;
value = k;
}
}
void update_unsigned_lower(app * v, numeral const & k) {
SASSERT(k > numeral(0));
// k <= v
obj_map<app, numeral>::obj_map_entry * entry = m_unsigned_lowers.insert_if_not_there2(v, k);
if (entry->get_data().m_value < k) {
auto& value = m_unsigned_lowers.insert_if_not_there(v, k);
if (value < k) {
// improve bound
entry->get_data().m_value = k;
value = k;
}
}
void update_unsigned_upper(app * v, numeral const & k) {
SASSERT(k > numeral(0));
// v <= k
obj_map<app, numeral>::obj_map_entry * entry = m_unsigned_uppers.insert_if_not_there2(v, k);
if (k < entry->get_data().m_value) {
auto& value = m_unsigned_uppers.insert_if_not_there(v, k);
if (k < value) {
// improve bound
entry->get_data().m_value = k;
value = k;
}
}