Commit 22316b51 authored by Robert Maynard's avatar Robert Maynard
Browse files

vtkmlib now consistently uses nullptr.

parent 07a89f7a
......@@ -409,7 +409,7 @@ int TestVTKMGradientAndVorticity(int argc, char *argv[])
{
int i;
// Need to get the data root.
const char *data_root = NULL;
const char *data_root = nullptr;
for (i = 0; i < argc-1; i++)
{
if (strcmp("-D", argv[i]) == 0)
......
......@@ -349,7 +349,7 @@ struct ArrayConverter
{
// we can grab the already allocated vtk memory
this->Data = handle.Internals->ControlArray.VTKArray();
this->Data->Register(NULL);
this->Data->Register(nullptr);
}
template <typename T>
......@@ -359,7 +359,7 @@ struct ArrayConverter
{
// we can grab the already allocated vtk memory
this->Data = handle.Internals->ControlArray.VTKArray();
this->Data->Register(NULL);
this->Data->Register(nullptr);
}
};
}
......
......@@ -300,8 +300,8 @@ struct CellSetConverter
~CellSetConverter()
{
this->Cells = NULL;
this->Valid = NULL;
this->Cells = nullptr;
this->Valid = nullptr;
}
template <typename T> void operator()(const T& cells) const
......
......@@ -44,8 +44,8 @@ namespace fromvtkm {
VTKACCELERATORSVTKM_EXPORT
bool Convert(const vtkm::cont::DynamicCellSet& toConvert,
vtkCellArray* cells,
vtkUnsignedCharArray* types = NULL,
vtkIdTypeArray* locations = NULL);
vtkUnsignedCharArray* types = nullptr,
vtkIdTypeArray* locations = nullptr);
}
#endif // vtkmlib_CellSetConverters_h
......@@ -72,7 +72,7 @@ vtkm::cont::CoordinateSystem deduce_container(vtkPoints *points)
}
typedef vtkm::Vec<T, 3> Vec3;
Vec3 *xyz = NULL;
Vec3 *xyz = nullptr;
return vtkm::cont::CoordinateSystem("coords", xyz, 0);
}
}
......@@ -94,7 +94,7 @@ vtkm::cont::CoordinateSystem Convert(vtkPoints *points)
// unsupported/null point set
typedef vtkm::Vec<vtkm::Float32, 3> Vec3;
Vec3 *xyz = NULL;
Vec3 *xyz = nullptr;
return vtkm::cont::CoordinateSystem("coords", xyz, 0);
}
......
......@@ -97,7 +97,7 @@ bool Convert(const vtkm::cont::DataSet& voutput, int extents[6], vtkImageData* o
{
vtkDataArray* attribute =
input->GetPointData()->GetAttribute(attributeType);
if (attribute == NULL)
if (attribute == nullptr)
{
continue;
}
......
......@@ -163,7 +163,7 @@ bool Convert(const vtkm::cont::DataSet& voutput, vtkPolyData* output,
{
vtkDataArray* attribute =
input->GetPointData()->GetAttribute(attributeType);
if (attribute == NULL)
if (attribute == nullptr)
{
continue;
}
......
......@@ -52,7 +52,7 @@ namespace tovtkm {
//------------------------------------------------------------------------------
template <typename VType, typename VTKDataArrayType>
vtkArrayPortal<VType, VTKDataArrayType>::vtkArrayPortal()
: VTKData(NULL), Size(0)
: VTKData(nullptr), Size(0)
{
}
......@@ -97,7 +97,7 @@ void vtkArrayPortal<VType, VTKDataArrayType>::Set(vtkm::Id index,
//------------------------------------------------------------------------------
template <typename Type>
vtkPointsPortal<Type>::vtkPointsPortal() : Points(NULL), Array(NULL), Size(0)
vtkPointsPortal<Type>::vtkPointsPortal() : Points(nullptr), Array(nullptr), Size(0)
{
}
......
......@@ -38,7 +38,7 @@ public:
typedef tovtkm::vtkArrayPortal<const ValueType, ArrayType> PortalConstType;
Storage()
: Array(NULL),
: Array(nullptr),
NumberOfValues(0),
AllocatedSize(0),
DeallocateOnRelease(false),
......@@ -132,7 +132,7 @@ public:
typedef tovtkm::vtkArrayPortal<const ValueType, ArrayType> PortalConstType;
Storage()
: Array(NULL),
: Array(nullptr),
NumberOfValues(0),
AllocatedSize(0),
DeallocateOnRelease(false),
......@@ -222,7 +222,7 @@ public:
typedef tovtkm::vtkArrayPortal<const ValueType, ArrayType> PortalConstType;
Storage()
: Array(NULL),
: Array(nullptr),
NumberOfValues(0),
AllocatedSize(0),
DeallocateOnRelease(false),
......
......@@ -29,18 +29,18 @@ void Storage<ValueType_, tovtkm::vtkAOSArrayContainerTag>::ReleaseResources()
{
if (this->NumberOfValues > 0)
{
VTKM_ASSERT(this->Array != NULL);
VTKM_ASSERT(this->Array != nullptr);
if (this->DeallocateOnRelease)
{
this->Array->Delete();
}
this->Array = NULL;
this->Array = nullptr;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
}
else
{
VTKM_ASSERT(this->Array == NULL);
VTKM_ASSERT(this->Array == nullptr);
}
}
......@@ -82,7 +82,7 @@ void Storage<ValueType_, tovtkm::vtkAOSArrayContainerTag>::Allocate(
catch (std::bad_alloc&)
{
// Make sure our state is OK.
this->Array = NULL;
this->Array = nullptr;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
throw vtkm::cont::ErrorBadAllocation(
......@@ -115,18 +115,18 @@ void Storage<ValueType_, tovtkm::vtkSOAArrayContainerTag>::ReleaseResources()
{
if (this->NumberOfValues > 0)
{
VTKM_ASSERT(this->Array != NULL);
VTKM_ASSERT(this->Array != nullptr);
if (this->DeallocateOnRelease)
{
this->Array->Delete();
}
this->Array = NULL;
this->Array = nullptr;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
}
else
{
VTKM_ASSERT(this->Array == NULL);
VTKM_ASSERT(this->Array == nullptr);
}
}
......@@ -168,7 +168,7 @@ void Storage<ValueType_, tovtkm::vtkSOAArrayContainerTag>::Allocate(
catch (std::bad_alloc&)
{
// Make sure our state is OK.
this->Array = NULL;
this->Array = nullptr;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
throw vtkm::cont::ErrorBadAllocation(
......@@ -201,18 +201,18 @@ void Storage<ValueType_, tovtkm::vtkCellArrayContainerTag>::ReleaseResources()
{
if (this->NumberOfValues > 0)
{
VTKM_ASSERT(this->Array != NULL);
VTKM_ASSERT(this->Array != nullptr);
if (this->DeallocateOnRelease)
{
this->Array->Delete();
}
this->Array = NULL;
this->Array = nullptr;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
}
else
{
VTKM_ASSERT(this->Array == NULL);
VTKM_ASSERT(this->Array == nullptr);
}
}
......@@ -252,7 +252,7 @@ void Storage<ValueType_, tovtkm::vtkCellArrayContainerTag>::Allocate(
catch (std::bad_alloc&)
{
// Make sure our state is OK.
this->Array = NULL;
this->Array = nullptr;
this->NumberOfValues = 0;
this->AllocatedSize = 0;
throw vtkm::cont::ErrorBadAllocation(
......
......@@ -123,7 +123,7 @@ bool Convert(const vtkm::cont::DataSet& voutput, vtkUnstructuredGrid* output,
{
vtkDataArray* attribute =
input->GetPointData()->GetAttribute(attributeType);
if (attribute == NULL)
if (attribute == nullptr)
{
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment