Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michael Migliore
VTK
Commits
22316b51
Commit
22316b51
authored
Sep 25, 2017
by
Robert Maynard
Browse files
vtkmlib now consistently uses nullptr.
parent
07a89f7a
Changes
11
Hide whitespace changes
Inline
Side-by-side
Accelerators/Vtkm/Testing/Cxx/TestVTKMGradientAndVorticity.cxx
View file @
22316b51
...
...
@@ -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
)
...
...
Accelerators/Vtkm/vtkmlib/ArrayConverters.cxx
View file @
22316b51
...
...
@@ -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
);
}
};
}
...
...
Accelerators/Vtkm/vtkmlib/CellSetConverters.cxx
View file @
22316b51
...
...
@@ -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
...
...
Accelerators/Vtkm/vtkmlib/CellSetConverters.h
View file @
22316b51
...
...
@@ -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
Accelerators/Vtkm/vtkmlib/DataSetConverters.cxx
View file @
22316b51
...
...
@@ -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
);
}
...
...
Accelerators/Vtkm/vtkmlib/ImageDataConverter.cxx
View file @
22316b51
...
...
@@ -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
;
}
...
...
Accelerators/Vtkm/vtkmlib/PolyDataConverter.cxx
View file @
22316b51
...
...
@@ -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
;
}
...
...
Accelerators/Vtkm/vtkmlib/Portals.hxx
View file @
22316b51
...
...
@@ -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
)
{
}
...
...
Accelerators/Vtkm/vtkmlib/Storage.h
View file @
22316b51
...
...
@@ -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
),
...
...
Accelerators/Vtkm/vtkmlib/Storage.hxx
View file @
22316b51
...
...
@@ -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
(
...
...
Accelerators/Vtkm/vtkmlib/UnstructuredGridConverter.cxx
View file @
22316b51
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment