3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-22 02:57:50 +00:00

Use nullptr.

This commit is contained in:
Bruce Mitchener 2018-02-12 14:05:55 +07:00
parent f01328c65f
commit 76eb7b9ede
625 changed files with 4639 additions and 4639 deletions

View file

@ -39,7 +39,7 @@ struct bv_trailing::imp {
TRACE("bv-trailing", tout << "ctor\n";);
for (unsigned i = 0; i <= TRAILING_DEPTH; ++i)
m_count_cache[i] = NULL;
m_count_cache[i] = nullptr;
}
virtual ~imp() {
@ -116,7 +116,7 @@ struct bv_trailing::imp {
const unsigned sz = m_util.get_bv_size(a);
if (to_rm == sz) {
result = NULL;
result = nullptr;
return sz;
}
@ -155,7 +155,7 @@ struct bv_trailing::imp {
const unsigned new_sz = sz - retv;
if (!new_sz) {
result = NULL;
result = nullptr;
return retv;
}
@ -181,7 +181,7 @@ struct bv_trailing::imp {
const unsigned num = a->get_num_args();
unsigned retv = 0;
unsigned i = num;
expr_ref new_last(NULL, m);
expr_ref new_last(nullptr, m);
while (i && retv < n) {
i--;
expr * const curr = a->get_arg(i);
@ -197,7 +197,7 @@ struct bv_trailing::imp {
if (!i && !new_last) {// all args eaten completely
SASSERT(retv == m_util.get_bv_size(a));
result = NULL;
result = nullptr;
return retv;
}
@ -230,7 +230,7 @@ struct bv_trailing::imp {
if (m_util.is_numeral(e, e_val, sz)) {
retv = remove_trailing(std::min(n, sz), e_val);
const unsigned new_sz = sz - retv;
result = new_sz ? (retv ? m_util.mk_numeral(e_val, new_sz) : e) : NULL;
result = new_sz ? (retv ? m_util.mk_numeral(e_val, new_sz) : e) : nullptr;
return retv;
}
if (m_util.is_bv_mul(e))
@ -338,7 +338,7 @@ struct bv_trailing::imp {
void cache(unsigned depth, expr * e, unsigned min, unsigned max) {
SASSERT(depth <= TRAILING_DEPTH);
if (depth == 0) return;
if (m_count_cache[depth] == NULL)
if (m_count_cache[depth] == nullptr)
m_count_cache[depth] = alloc(map);
SASSERT(!m_count_cache[depth]->contains(e));
m.inc_ref(e);
@ -353,10 +353,10 @@ struct bv_trailing::imp {
max = m_util.get_bv_size(e);
return true;
}
if (m_count_cache[depth] == NULL)
if (m_count_cache[depth] == nullptr)
return false;
const map::obj_map_entry * const oe = m_count_cache[depth]->find_core(e);
if (oe == NULL) return false;
if (oe == nullptr) return false;
min = oe->get_data().m_value.first;
max = oe->get_data().m_value.second;
TRACE("bv-trailing", tout << "cached@" << depth << ": " << mk_ismt2_pp(e, m) << '[' << m_util.get_bv_size(e) << "]\n: " << min << '-' << max << "\n";);
@ -366,7 +366,7 @@ struct bv_trailing::imp {
void reset_cache(const unsigned condition) {
SASSERT(m_count_cache[0] == NULL);
for (unsigned i = 1; i <= TRAILING_DEPTH; ++i) {
if (m_count_cache[i] == NULL) continue;
if (m_count_cache[i] == nullptr) continue;
TRACE("bv-trailing", tout << "may reset cache " << i << " " << condition << "\n";);
if (condition && m_count_cache[i]->size() < condition) continue;
TRACE("bv-trailing", tout << "reset cache " << i << "\n";);
@ -374,7 +374,7 @@ struct bv_trailing::imp {
map::iterator end = m_count_cache[i]->end();
for (; it != end; ++it) m.dec_ref(it->m_key);
dealloc(m_count_cache[i]);
m_count_cache[i] = NULL;
m_count_cache[i] = nullptr;
}
}