Path: modernize C++11

* use nullptr
This commit is contained in:
wmayer
2022-03-23 19:13:07 +01:00
parent b5c71395f1
commit 7b591da9f5
37 changed files with 163 additions and 163 deletions

View File

@@ -35,7 +35,7 @@ TYPESYSTEM_SOURCE(Path::VoronoiEdge , Base::Persistence)
VoronoiEdge::VoronoiEdge(Voronoi::diagram_type *d, long index)
: dia(d)
, index(index)
, ptr(0)
, ptr(nullptr)
{
if (dia && long(dia->num_edges()) > index) {
ptr = &(dia->edges()[index]);
@@ -56,11 +56,11 @@ VoronoiEdge::~VoronoiEdge() {
}
bool VoronoiEdge::isBound(void) const {
if (ptr != 0 && dia.isValid() && index != Voronoi::InvalidIndex) {
if (ptr != nullptr && dia.isValid() && index != Voronoi::InvalidIndex) {
if (&(dia->edges()[index]) == ptr) {
return true;
}
}
ptr = 0;
ptr = nullptr;
return false;
}