3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-08 16:25:48 +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

@ -107,7 +107,7 @@ public:
char const * get_usage() const override { return "<symbol> (<symbol>*) <symbol>"; }
char const * get_descr(cmd_context & ctx) const override { return "substitute the free variables in the AST referenced by <symbol> using the ASTs referenced by <symbol>*"; }
unsigned get_arity() const override { return 3; }
void prepare(cmd_context & ctx) override { m_idx = 0; m_source = 0; }
void prepare(cmd_context & ctx) override { m_idx = 0; m_source = nullptr; }
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_idx == 1) return CPK_SYMBOL_LIST;
return CPK_SYMBOL;
@ -182,10 +182,10 @@ public:
char const * get_usage() const override { return "<term> <term>"; }
char const * get_descr(cmd_context & ctx) const override { return "return true if the first term is smaller than the second one in the internal Z3 total order on terms."; }
unsigned get_arity() const override { return 2; }
void prepare(cmd_context & ctx) override { m_t1 = 0; }
void prepare(cmd_context & ctx) override { m_t1 = nullptr; }
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override { return CPK_EXPR; }
void set_next_arg(cmd_context & ctx, expr * arg) override {
if (m_t1 == 0)
if (m_t1 == nullptr)
m_t1 = arg;
else
m_t2 = arg;
@ -286,10 +286,10 @@ public:
char const * get_usage() const override { return "<quantifier> (<symbol>*)"; }
char const * get_descr(cmd_context & ctx) const override { return "instantiate the quantifier using the given expressions."; }
unsigned get_arity() const override { return 2; }
void prepare(cmd_context & ctx) override { m_q = 0; m_args.reset(); }
void prepare(cmd_context & ctx) override { m_q = nullptr; m_args.reset(); }
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_q == 0) return CPK_EXPR;
if (m_q == nullptr) return CPK_EXPR;
else return CPK_EXPR_LIST;
}

View file

@ -104,7 +104,7 @@ class poly_isolate_roots_cmd : public cmd {
}
void set_next_arg(cmd_context & ctx, expr * arg) {
if (m_p.get() == 0) {
if (m_p.get() == nullptr) {
scoped_mpz d(m_qm);
if (!m_expr2poly.to_polynomial(arg, m_p, d))
throw cmd_exception("expression is not a polynomial");
@ -132,7 +132,7 @@ class poly_isolate_roots_cmd : public cmd {
}
void execute(cmd_context & ctx) {
if (m_p.get() == 0)
if (m_p.get() == nullptr)
throw cmd_exception("polynomial expected");
polynomial::var_vector xs;
m_pm.vars(m_p, xs);
@ -162,7 +162,7 @@ class poly_isolate_roots_cmd : public cmd {
scoped_ptr<context> m_ctx;
public:
poly_isolate_roots_cmd(char const * name = "poly/isolate-roots"):cmd(name), m_ctx(0) {}
poly_isolate_roots_cmd(char const * name = "poly/isolate-roots"):cmd(name), m_ctx(nullptr) {}
char const * get_usage() const override { return "<term> (<term> <value>)*"; }
@ -175,11 +175,11 @@ public:
}
void finalize(cmd_context & ctx) override {
m_ctx = 0;
m_ctx = nullptr;
}
void failure_cleanup(cmd_context & ctx) override {
m_ctx = 0;
m_ctx = nullptr;
}
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
@ -192,7 +192,7 @@ public:
void execute(cmd_context & ctx) override {
m_ctx->execute(ctx);
m_ctx = 0;
m_ctx = nullptr;
}
};
@ -216,11 +216,11 @@ public:
void prepare(cmd_context & ctx) override {
parametric_cmd::prepare(ctx);
m_target = 0;
m_target = nullptr;
}
cmd_arg_kind next_arg_kind(cmd_context & ctx) const override {
if (m_target == 0) return CPK_EXPR;
if (m_target == nullptr) return CPK_EXPR;
return parametric_cmd::next_arg_kind(ctx);
}