mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
Use nullptr.
This commit is contained in:
parent
f01328c65f
commit
76eb7b9ede
625 changed files with 4639 additions and 4639 deletions
|
@ -71,9 +71,9 @@ void func_entry::deallocate(ast_manager & m, unsigned arity) {
|
|||
func_interp::func_interp(ast_manager & m, unsigned arity):
|
||||
m_manager(m),
|
||||
m_arity(arity),
|
||||
m_else(0),
|
||||
m_else(nullptr),
|
||||
m_args_are_values(true),
|
||||
m_interp(0) {
|
||||
m_interp(nullptr) {
|
||||
}
|
||||
|
||||
func_interp::~func_interp() {
|
||||
|
@ -102,7 +102,7 @@ func_interp * func_interp::copy() const {
|
|||
|
||||
void func_interp::reset_interp_cache() {
|
||||
m_manager.dec_ref(m_interp);
|
||||
m_interp = 0;
|
||||
m_interp = nullptr;
|
||||
}
|
||||
|
||||
bool func_interp::is_fi_entry_expr(expr * e, ptr_vector<expr> & args) {
|
||||
|
@ -183,13 +183,13 @@ func_entry * func_interp::get_entry(expr * const * args) const {
|
|||
if (curr->eq_args(m(), m_arity, args))
|
||||
return curr;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void func_interp::insert_entry(expr * const * args, expr * r) {
|
||||
reset_interp_cache();
|
||||
func_entry * entry = get_entry(args);
|
||||
if (entry != 0) {
|
||||
if (entry != nullptr) {
|
||||
entry->set_result(m_manager, r);
|
||||
return;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void func_interp::insert_new_entry(expr * const * args, expr * r) {
|
|||
}
|
||||
|
||||
bool func_interp::eval_else(expr * const * args, expr_ref & result) const {
|
||||
if (m_else == 0)
|
||||
if (m_else == nullptr)
|
||||
return false;
|
||||
var_subst s(m_manager, false);
|
||||
SASSERT(!s.std_order()); // (VAR 0) <- args[0], (VAR 1) <- args[1], ...
|
||||
|
@ -232,9 +232,9 @@ bool func_interp::eval_else(expr * const * args, expr_ref & result) const {
|
|||
*/
|
||||
expr * func_interp::get_max_occ_result() const {
|
||||
if (m_entries.empty())
|
||||
return 0;
|
||||
return nullptr;
|
||||
obj_map<expr, unsigned> num_occs;
|
||||
expr * r_max = 0;
|
||||
expr * r_max = nullptr;
|
||||
unsigned max = 0;
|
||||
ptr_vector<func_entry>::const_iterator it = m_entries.begin();
|
||||
ptr_vector<func_entry>::const_iterator end = m_entries.end();
|
||||
|
@ -257,7 +257,7 @@ expr * func_interp::get_max_occ_result() const {
|
|||
\brief Remove entries e such that e.get_result() == m_else.
|
||||
*/
|
||||
void func_interp::compress() {
|
||||
if (m_else == 0 || m_entries.empty())
|
||||
if (m_else == nullptr || m_entries.empty())
|
||||
return; // nothing to be done
|
||||
if (!is_ground(m_else))
|
||||
return; // forall entries e in m_entries e.get_result() is ground
|
||||
|
@ -284,8 +284,8 @@ void func_interp::compress() {
|
|||
}
|
||||
|
||||
expr * func_interp::get_interp_core() const {
|
||||
if (m_else == 0)
|
||||
return 0;
|
||||
if (m_else == nullptr)
|
||||
return nullptr;
|
||||
expr * r = m_else;
|
||||
ptr_buffer<expr> vars;
|
||||
ptr_vector<func_entry>::const_iterator it = m_entries.begin();
|
||||
|
@ -313,10 +313,10 @@ expr * func_interp::get_interp_core() const {
|
|||
}
|
||||
|
||||
expr * func_interp::get_interp() const {
|
||||
if (m_interp != 0)
|
||||
if (m_interp != nullptr)
|
||||
return m_interp;
|
||||
expr * r = get_interp_core();
|
||||
if (r != 0) {
|
||||
if (r != nullptr) {
|
||||
const_cast<func_interp*>(this)->m_interp = r;
|
||||
m_manager.inc_ref(m_interp);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue