diff --git a/spot/kripke/kripkegraph.hh b/spot/kripke/kripkegraph.hh index 348e1ccf5..d6292c070 100644 --- a/spot/kripke/kripkegraph.hh +++ b/spot/kripke/kripkegraph.hh @@ -64,8 +64,7 @@ namespace spot virtual size_t hash() const override { - return - reinterpret_cast(this) - static_cast(nullptr); + return reinterpret_cast(this); } virtual kripke_graph_state* diff --git a/spot/misc/hash.hh b/spot/misc/hash.hh index 94f603b7c..b99c4ab53 100644 --- a/spot/misc/hash.hh +++ b/spot/misc/hash.hh @@ -48,8 +48,7 @@ namespace spot size_t operator()(const T* p) const noexcept { - return knuth32_hash(reinterpret_cast(p) - - static_cast(nullptr)); + return knuth32_hash(reinterpret_cast(p)); } }; diff --git a/spot/twa/acc.hh b/spot/twa/acc.hh index 761433f54..455850f35 100644 --- a/spot/twa/acc.hh +++ b/spot/twa/acc.hh @@ -1670,6 +1670,7 @@ namespace spot #ifndef SWIG rs_pair() = default; rs_pair(const rs_pair&) = default; + rs_pair& operator=(const rs_pair&) = default; #endif rs_pair(acc_cond::mark_t fin, acc_cond::mark_t inf) noexcept: diff --git a/spot/twa/taatgba.cc b/spot/twa/taatgba.cc index 416028e37..1ae35ff1b 100644 --- a/spot/twa/taatgba.cc +++ b/spot/twa/taatgba.cc @@ -105,7 +105,7 @@ namespace spot taa_tgba::state_set::const_iterator it = s_->begin(); while (it != s_->end()) { - res ^= reinterpret_cast(*it++) - static_cast(nullptr); + res ^= reinterpret_cast(*it++); res = wang32_hash(res); } return res; diff --git a/spot/twa/twagraph.hh b/spot/twa/twagraph.hh index 683fa32c8..c6222871e 100644 --- a/spot/twa/twagraph.hh +++ b/spot/twa/twagraph.hh @@ -70,8 +70,7 @@ namespace spot virtual size_t hash() const override { - return - reinterpret_cast(this) - static_cast(nullptr); + return reinterpret_cast(this); } virtual twa_graph_state* diff --git a/tests/core/ngraph.cc b/tests/core/ngraph.cc index 021e66452..0a64f5f73 100644 --- a/tests/core/ngraph.cc +++ b/tests/core/ngraph.cc @@ -372,8 +372,7 @@ public: size_t hash() const override { - return - reinterpret_cast(this) - static_cast(nullptr); + return reinterpret_cast(this); } my_state* clone() const override