Path: modernize C++11
* use nullptr
This commit is contained in:
@@ -34,7 +34,7 @@ TYPESYSTEM_SOURCE(Path::VoronoiCell , Base::Persistence)
|
||||
VoronoiCell::VoronoiCell(Voronoi::diagram_type *d, long index)
|
||||
: dia(d)
|
||||
, index(index)
|
||||
, ptr(0)
|
||||
, ptr(nullptr)
|
||||
{
|
||||
if (dia && long(dia->num_cells()) > index) {
|
||||
ptr = &(dia->cells()[index]);
|
||||
@@ -55,12 +55,12 @@ VoronoiCell::~VoronoiCell() {
|
||||
}
|
||||
|
||||
bool VoronoiCell::isBound(void) const {
|
||||
if (ptr != 0 && dia.isValid() && index != Voronoi::InvalidIndex) {
|
||||
if (ptr != nullptr && dia.isValid() && index != Voronoi::InvalidIndex) {
|
||||
if (&(dia->cells()[index]) == ptr) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
ptr = 0;
|
||||
ptr = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user