3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +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

@ -41,7 +41,7 @@ static stopwatch g_overall_time;
static stopwatch g_piece_timer;
static unsigned t_parsing = 0;
static datalog::context * g_ctx = 0;
static datalog::context * g_ctx = nullptr;
static datalog::rule_set * g_orig_rules;
static datalog::instruction_block * g_code;
static datalog::execution_context * g_ectx;
@ -257,7 +257,7 @@ unsigned read_datalog(char const * file) {
true);
return ERR_MEMOUT;
}
register_on_timeout_proc(0);
register_on_timeout_proc(nullptr);
return 0;
}

View file

@ -26,7 +26,7 @@ Revision History:
#include "util/gparams.h"
extern bool g_display_statistics;
static sat::solver * g_solver = 0;
static sat::solver * g_solver = nullptr;
static clock_t g_start_time;
static void display_statistics() {
@ -134,7 +134,7 @@ unsigned read_dimacs(char const * file_name) {
params_ref p = gparams::get_module("sat");
p.set_bool("produce_models", true);
reslimit limit;
sat::solver solver(p, limit, 0);
sat::solver solver(p, limit, nullptr);
g_solver = &solver;
if (file_name) {
@ -152,7 +152,7 @@ unsigned read_dimacs(char const * file_name) {
lbool r;
vector<sat::literal_vector> tracking_clauses;
sat::solver solver2(p, limit, 0);
sat::solver solver2(p, limit, nullptr);
if (p.get_bool("dimacs.core", false)) {
g_solver = &solver2;
sat::literal_vector assumptions;

View file

@ -17,7 +17,7 @@ Author:
#include "util/gparams.h"
#include <signal.h>
static lp::lp_solver<double, double>* g_solver = 0;
static lp::lp_solver<double, double>* g_solver = nullptr;
static void display_statistics() {
if (g_solver && g_solver->settings().print_statistics) {
@ -95,8 +95,8 @@ void run_solver(lp_params & params, char const * mps_file_name) {
// #pragma omp critical (g_display_stats)
{
display_statistics();
register_on_timeout_proc(0);
g_solver = 0;
register_on_timeout_proc(nullptr);
g_solver = nullptr;
}
delete solver;
}

View file

@ -41,7 +41,7 @@ Revision History:
typedef enum { IN_UNSPECIFIED, IN_SMTLIB_2, IN_DATALOG, IN_DIMACS, IN_WCNF, IN_OPB, IN_Z3_LOG, IN_MPS } input_kind;
std::string g_aux_input_file;
char const * g_input_file = 0;
char const * g_input_file = nullptr;
bool g_standard_input = false;
input_kind g_input_kind = IN_UNSPECIFIED;
bool g_display_statistics = false;
@ -113,7 +113,7 @@ void display_usage() {
void parse_cmd_line_args(int argc, char ** argv) {
int i = 1;
char * eq_pos = 0;
char * eq_pos = nullptr;
while (i < argc) {
char * arg = argv[i];
@ -145,7 +145,7 @@ void parse_cmd_line_args(int argc, char ** argv) {
// allow names such as --help
if (*opt_name == '-')
opt_name++;
char * opt_arg = 0;
char * opt_arg = nullptr;
char * colon = strchr(arg, ':');
if (colon) {
opt_arg = colon + 1;
@ -200,7 +200,7 @@ void parse_cmd_line_args(int argc, char ** argv) {
else if (strcmp(opt_name, "v") == 0) {
if (!opt_arg)
error("option argument (-v:level) is missing.");
long lvl = strtol(opt_arg, 0, 10);
long lvl = strtol(opt_arg, nullptr, 10);
set_verbosity_level(lvl);
}
else if (strcmp(opt_name, "file") == 0) {
@ -209,7 +209,7 @@ void parse_cmd_line_args(int argc, char ** argv) {
else if (strcmp(opt_name, "T") == 0) {
if (!opt_arg)
error("option argument (-T:timeout) is missing.");
long tm = strtol(opt_arg, 0, 10);
long tm = strtol(opt_arg, nullptr, 10);
set_timeout(tm * 1000);
}
else if (strcmp(opt_name, "t") == 0) {

View file

@ -17,7 +17,7 @@ Copyright (c) 2015 Microsoft Corporation
extern bool g_display_statistics;
static bool g_first_interrupt = true;
static opt::context* g_opt = 0;
static opt::context* g_opt = nullptr;
static double g_start_time = 0;
static unsigned_vector g_handles;
@ -115,8 +115,8 @@ static unsigned parse_opt(std::istream& in, bool is_wcnf) {
#pragma omp critical (g_display_stats)
{
display_statistics();
register_on_timeout_proc(0);
g_opt = 0;
register_on_timeout_proc(nullptr);
g_opt = nullptr;
}
return 0;
}

View file

@ -34,7 +34,7 @@ Revision History:
extern bool g_display_statistics;
static clock_t g_start_time;
static cmd_context * g_cmd_context = 0;
static cmd_context * g_cmd_context = nullptr;
static void display_statistics() {
clock_t end_time = clock();
@ -102,7 +102,7 @@ unsigned read_smtlib2_commands(char const * file_name) {
#pragma omp critical (g_display_stats)
{
display_statistics();
g_cmd_context = 0;
g_cmd_context = nullptr;
}
return result ? 0 : 1;
}