nullptr cleanup for -Wzero-as-null-pointer-constant
Fixes #106. * m4/gccwarn.m4: Use -Wzero-as-null-pointer-constant if supported. * src/bin/autfilt.cc, src/bin/common_aoutput.cc, src/bin/common_finput.cc, src/bin/common_finput.hh, src/bin/common_output.cc, src/bin/common_output.hh, src/bin/common_post.cc, src/bin/common_r.hh, src/bin/common_range.hh, src/bin/common_setup.cc, src/bin/common_trans.cc, src/bin/dstar2tgba.cc, src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/ltlfilt.cc, src/bin/ltlgrind.cc, src/bin/randaut.cc, src/bin/randltl.cc, src/bin/spot-x.cc, src/kripke/kripkeexplicit.cc, src/ltlast/formula.cc, src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh, src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh, src/ltlvisit/simplify.cc, src/ltlvisit/snf.hh, src/misc/fixpool.hh, src/misc/mspool.hh, src/misc/hash.hh, src/misc/optionmap.cc, src/misc/satsolver.cc, src/misc/tmpfile.cc, src/misc/tmpfile.hh, src/priv/bddalloc.cc, src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc, src/ta/tgtaexplicit.hh, src/ta/tgtaproduct.cc, src/taalgos/minimize.cc, src/taalgos/reachiter.cc, src/taalgos/tgba2ta.cc, src/tests/complementation.cc, src/tests/ikwiad.cc, src/tests/randtgba.cc, src/tests/reduc.cc, src/twa/bdddict.cc, src/twa/bddprint.cc, src/twa/taatgba.cc, src/twa/twa.cc, src/twa/twagraph.hh, src/twa/twaproduct.cc, src/twa/twasafracomplement.cc, src/twaalgos/bfssteps.cc, src/twaalgos/compsusp.cc, src/twaalgos/dtgbasat.cc, src/twaalgos/emptiness.cc, src/twaalgos/gtec/ce.cc, src/twaalgos/gv04.cc, src/twaalgos/ltl2taa.cc, src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/ltl2tgba_fm.hh, src/twaalgos/magic.cc, src/twaalgos/minimize.cc, src/twaalgos/ndfs_result.hxx, src/twaalgos/postproc.cc, src/twaalgos/postproc.hh, src/twaalgos/reachiter.cc, src/twaalgos/reducerun.cc, src/twaalgos/safety.hh, src/twaalgos/sccfilter.hh, src/twaalgos/se05.cc, src/twaalgos/simulation.cc, src/twaalgos/tau03.cc, src/twaalgos/tau03opt.cc, src/twaalgos/translate.cc, src/twaalgos/translate.hh, utf8/utf8/core.h, bench/stutter/stutter_invariance_formulas.cc, iface/ltsmin/ltsmin.cc, iface/ltsmin/modelcheck.cc: Use nullptr to fix the warning.
This commit is contained in:
parent
51a3cfcede
commit
1729a79ac7
87 changed files with 755 additions and 717 deletions
|
|
@ -49,7 +49,7 @@ namespace spot
|
|||
// WARNING: We need a default constructor so this can be used in
|
||||
// a hash; but we should ensure that no object in the hash is
|
||||
// constructed with p==0.
|
||||
anon_free_list(bdd_dict_priv* p = 0)
|
||||
anon_free_list(bdd_dict_priv* p = nullptr)
|
||||
: priv_(p)
|
||||
{
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ namespace spot
|
|||
|
||||
bdd_dict_priv()
|
||||
{
|
||||
free_anonymous_list_of[0] = anon_free_list(this);
|
||||
free_anonymous_list_of[nullptr] = anon_free_list(this);
|
||||
}
|
||||
|
||||
/// List of unused anonymous variable number for each automaton.
|
||||
|
|
@ -202,7 +202,7 @@ namespace spot
|
|||
{
|
||||
i = (priv_->free_anonymous_list_of.insert
|
||||
(fal::value_type(for_me,
|
||||
priv_->free_anonymous_list_of[0]))).first;
|
||||
priv_->free_anonymous_list_of[nullptr]))).first;
|
||||
}
|
||||
int res = i->second.register_n(n);
|
||||
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace spot
|
|||
want_acc = true;
|
||||
bdd_strm_hook(print_handler);
|
||||
os << bddset << b;
|
||||
bdd_strm_hook(0);
|
||||
bdd_strm_hook(nullptr);
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace spot
|
|||
|
||||
taa_tgba::taa_tgba(const bdd_dict_ptr& dict)
|
||||
: twa(dict),
|
||||
init_(0), state_set_vec_()
|
||||
init_(nullptr), state_set_vec_()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ namespace spot
|
|||
taa_tgba::state_set::const_iterator it = s_->begin();
|
||||
while (it != s_->end())
|
||||
{
|
||||
res ^= reinterpret_cast<const char*>(*it++) - static_cast<char*>(0);
|
||||
res ^= reinterpret_cast<const char*>(*it++) - static_cast<char*>(nullptr);
|
||||
res = wang32_hash(res);
|
||||
}
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace spot
|
|||
twa::twa(const bdd_dict_ptr& d)
|
||||
: iter_cache_(nullptr),
|
||||
dict_(d),
|
||||
last_support_conditions_input_(0)
|
||||
last_support_conditions_input_(nullptr)
|
||||
{
|
||||
props = 0U;
|
||||
bddaps_ = bddtrue;
|
||||
|
|
@ -65,7 +65,7 @@ namespace spot
|
|||
{
|
||||
if (t.get() == this)
|
||||
return s->clone();
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ namespace spot
|
|||
get_dict()->unregister_all_my_variables(this);
|
||||
// Prevent this state from being destroyed by ~twa(),
|
||||
// as the state will be destroyed when g_ is destroyed.
|
||||
last_support_conditions_input_ = 0;
|
||||
last_support_conditions_input_ = nullptr;
|
||||
}
|
||||
|
||||
#ifndef SWIG
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ namespace spot
|
|||
if (!(left_->first() && right_->first()))
|
||||
{
|
||||
delete right_;
|
||||
right_ = 0;
|
||||
right_ = nullptr;
|
||||
return false;
|
||||
}
|
||||
return next_non_false_();
|
||||
|
|
@ -326,7 +326,7 @@ namespace spot
|
|||
if (last_support_conditions_input_)
|
||||
{
|
||||
last_support_conditions_input_->destroy();
|
||||
last_support_conditions_input_ = 0;
|
||||
last_support_conditions_input_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace spot
|
|||
/// \brief Is this node the root of the tree?
|
||||
bool is_root() const
|
||||
{
|
||||
return parent == 0;
|
||||
return parent == nullptr;
|
||||
}
|
||||
|
||||
bool marked;
|
||||
|
|
@ -141,14 +141,14 @@ namespace spot
|
|||
safra_tree::safra_tree()
|
||||
: marked(false), name(0)
|
||||
{
|
||||
parent = 0;
|
||||
parent = nullptr;
|
||||
}
|
||||
|
||||
/// \brief Copy the tree \a other, and set \c marked to false.
|
||||
safra_tree::safra_tree(const safra_tree& other)
|
||||
: marked(false), name(other.name), nodes(other.nodes)
|
||||
{
|
||||
parent = 0;
|
||||
parent = nullptr;
|
||||
for (auto i: other.children)
|
||||
{
|
||||
safra_tree* c = new safra_tree(*i);
|
||||
|
|
@ -254,7 +254,7 @@ namespace spot
|
|||
int
|
||||
safra_tree::get_new_name() const
|
||||
{
|
||||
if (parent == 0)
|
||||
if (parent == nullptr)
|
||||
{
|
||||
if (free_names_.empty())
|
||||
{
|
||||
|
|
@ -1014,7 +1014,7 @@ namespace spot
|
|||
////////////////////////
|
||||
|
||||
safra_tree_automaton::safra_tree_automaton(const const_twa_graph_ptr& a)
|
||||
: max_nb_pairs_(-1), initial_state(0), a_(a)
|
||||
: max_nb_pairs_(-1), initial_state(nullptr), a_(a)
|
||||
{
|
||||
a->get_dict()->register_all_variables_of(a, this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue