Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Michael Migliore
VTK
Commits
1c0cb29c
Commit
1c0cb29c
authored
Jul 26, 2017
by
Kitware Robot
Committed by
Ken Martin
Jul 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the cxx tests to use nullptr instead of 0/NULL
updating the tests to follow modern standards
parent
105291ee
Changes
168
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
264 additions
and
264 deletions
+264
-264
Charts/Core/Testing/Cxx/TestBarGraph.cxx
Charts/Core/Testing/Cxx/TestBarGraph.cxx
+1
-1
Charts/Core/Testing/Cxx/TestBarGraphHorizontal.cxx
Charts/Core/Testing/Cxx/TestBarGraphHorizontal.cxx
+2
-2
Charts/Core/Testing/Cxx/TestBarGraphSelection.cxx
Charts/Core/Testing/Cxx/TestBarGraphSelection.cxx
+1
-1
Charts/Core/Testing/Cxx/TestMultipleScalarsToColors.cxx
Charts/Core/Testing/Cxx/TestMultipleScalarsToColors.cxx
+1
-1
Charts/Core/Testing/Cxx/TestStackedBarGraph.cxx
Charts/Core/Testing/Cxx/TestStackedBarGraph.cxx
+1
-1
Charts/Core/Testing/Cxx/TestStackedPlot.cxx
Charts/Core/Testing/Cxx/TestStackedPlot.cxx
+1
-1
Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
...tationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
+3
-3
Common/Core/Testing/Cxx/TestCollection.cxx
Common/Core/Testing/Cxx/TestCollection.cxx
+3
-3
Common/Core/Testing/Cxx/TestGarbageCollector.cxx
Common/Core/Testing/Cxx/TestGarbageCollector.cxx
+1
-1
Common/Core/Testing/Cxx/TestNew.cxx
Common/Core/Testing/Cxx/TestNew.cxx
+5
-5
Common/Core/Testing/Cxx/TestSmartPointer.cxx
Common/Core/Testing/Cxx/TestSmartPointer.cxx
+6
-6
Common/Core/Testing/Cxx/TestSystemInformation.cxx
Common/Core/Testing/Cxx/TestSystemInformation.cxx
+1
-1
Common/Core/Testing/Cxx/TestUnicodeStringArrayAPI.cxx
Common/Core/Testing/Cxx/TestUnicodeStringArrayAPI.cxx
+1
-1
Common/Core/Testing/Cxx/TestWeakPointer.cxx
Common/Core/Testing/Cxx/TestWeakPointer.cxx
+10
-10
Common/DataModel/Testing/Cxx/TestImageDataFindCell.cxx
Common/DataModel/Testing/Cxx/TestImageDataFindCell.cxx
+3
-3
Common/DataModel/Testing/Cxx/TestImageIterator.cxx
Common/DataModel/Testing/Cxx/TestImageIterator.cxx
+11
-11
Common/DataModel/Testing/Cxx/TestQuadraticPolygon.cxx
Common/DataModel/Testing/Cxx/TestQuadraticPolygon.cxx
+1
-1
Common/DataModel/Testing/Cxx/TestSmoothErrorMetric.cxx
Common/DataModel/Testing/Cxx/TestSmoothErrorMetric.cxx
+3
-3
Common/DataModel/Testing/Cxx/otherImageData.cxx
Common/DataModel/Testing/Cxx/otherImageData.cxx
+6
-6
Common/DataModel/Testing/Cxx/otherRectilinearGrid.cxx
Common/DataModel/Testing/Cxx/otherRectilinearGrid.cxx
+6
-6
Common/DataModel/Testing/Cxx/otherStructuredGrid.cxx
Common/DataModel/Testing/Cxx/otherStructuredGrid.cxx
+7
-7
Common/DataModel/Testing/Cxx/otherUniformGrid.cxx
Common/DataModel/Testing/Cxx/otherUniformGrid.cxx
+6
-6
Common/DataModel/vtkDispatcher_Private.h
Common/DataModel/vtkDispatcher_Private.h
+2
-2
Common/ExecutionModel/Testing/Cxx/TestThreadedImageAlgorithmSplitExtent.cxx
...del/Testing/Cxx/TestThreadedImageAlgorithmSplitExtent.cxx
+1
-1
Common/Math/Testing/Cxx/TestPolynomialSolversUnivariate.cxx
Common/Math/Testing/Cxx/TestPolynomialSolversUnivariate.cxx
+3
-3
Domains/Chemistry/Testing/Cxx/TestPeriodicTable.cxx
Domains/Chemistry/Testing/Cxx/TestPeriodicTable.cxx
+2
-2
Filters/Extraction/Testing/Cxx/TestConvertSelection.cxx
Filters/Extraction/Testing/Cxx/TestConvertSelection.cxx
+4
-4
Filters/FlowPaths/Testing/Cxx/TestLagrangianParticleTracker.cxx
...s/FlowPaths/Testing/Cxx/TestLagrangianParticleTracker.cxx
+1
-1
Filters/General/Testing/Cxx/TestPassThrough.cxx
Filters/General/Testing/Cxx/TestPassThrough.cxx
+2
-2
Filters/General/Testing/Cxx/TestQuadraturePoints.cxx
Filters/General/Testing/Cxx/TestQuadraturePoints.cxx
+4
-4
Filters/General/Testing/Cxx/TestTableSplitColumnComponents.cxx
...rs/General/Testing/Cxx/TestTableSplitColumnComponents.cxx
+1
-1
Filters/General/Testing/Cxx/TestTessellator.cxx
Filters/General/Testing/Cxx/TestTessellator.cxx
+23
-23
Filters/Generic/Testing/Cxx/TestGenericClip.cxx
Filters/Generic/Testing/Cxx/TestGenericClip.cxx
+3
-3
Filters/Generic/Testing/Cxx/TestGenericContourFilter.cxx
Filters/Generic/Testing/Cxx/TestGenericContourFilter.cxx
+3
-3
Filters/Generic/Testing/Cxx/TestGenericCutter.cxx
Filters/Generic/Testing/Cxx/TestGenericCutter.cxx
+3
-3
Filters/Generic/Testing/Cxx/TestGenericDataSetTessellator.cxx
...ers/Generic/Testing/Cxx/TestGenericDataSetTessellator.cxx
+3
-3
Filters/Generic/Testing/Cxx/TestGenericGeometryFilter.cxx
Filters/Generic/Testing/Cxx/TestGenericGeometryFilter.cxx
+3
-3
Filters/Generic/Testing/Cxx/TestGenericGlyph3DFilter.cxx
Filters/Generic/Testing/Cxx/TestGenericGlyph3DFilter.cxx
+3
-3
Filters/Generic/Testing/Cxx/TestGenericProbeFilter.cxx
Filters/Generic/Testing/Cxx/TestGenericProbeFilter.cxx
+3
-3
Filters/Generic/Testing/Cxx/otherCreation.cxx
Filters/Generic/Testing/Cxx/otherCreation.cxx
+46
-46
Filters/Geometry/Testing/Cxx/TestUnstructuredGridGeometryFilter.cxx
...ometry/Testing/Cxx/TestUnstructuredGridGeometryFilter.cxx
+2
-2
Filters/Hybrid/Testing/Cxx/TemporalStatistics.cxx
Filters/Hybrid/Testing/Cxx/TemporalStatistics.cxx
+1
-1
Filters/Hybrid/Testing/Cxx/TestTemporalCacheSimple.cxx
Filters/Hybrid/Testing/Cxx/TestTemporalCacheSimple.cxx
+1
-1
Filters/Hybrid/Testing/Cxx/TestTemporalCacheTemporal.cxx
Filters/Hybrid/Testing/Cxx/TestTemporalCacheTemporal.cxx
+1
-1
Filters/Hybrid/Testing/Cxx/TestTemporalFractal.cxx
Filters/Hybrid/Testing/Cxx/TestTemporalFractal.cxx
+1
-1
Filters/HyperTree/Testing/Cxx/TestClipHyperOctree.cxx
Filters/HyperTree/Testing/Cxx/TestClipHyperOctree.cxx
+9
-9
Filters/HyperTree/Testing/Cxx/TestHyperOctreeContourFilter.cxx
...rs/HyperTree/Testing/Cxx/TestHyperOctreeContourFilter.cxx
+6
-6
Filters/HyperTree/Testing/Cxx/TestHyperOctreeCutter.cxx
Filters/HyperTree/Testing/Cxx/TestHyperOctreeCutter.cxx
+6
-6
Filters/HyperTree/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx
...rs/HyperTree/Testing/Cxx/TestHyperOctreeSurfaceFilter.cxx
+2
-2
Filters/HyperTree/Testing/Cxx/TestHyperOctreeToUniformGrid.cxx
...rs/HyperTree/Testing/Cxx/TestHyperOctreeToUniformGrid.cxx
+6
-6
Filters/Parallel/Testing/Cxx/DistributedData.cxx
Filters/Parallel/Testing/Cxx/DistributedData.cxx
+1
-1
Filters/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx
Filters/Parallel/Testing/Cxx/DistributedDataRenderPass.cxx
+2
-2
Filters/Parallel/Testing/Cxx/ParallelResampling.cxx
Filters/Parallel/Testing/Cxx/ParallelResampling.cxx
+1
-1
Filters/Parallel/Testing/Cxx/TransmitImageData.cxx
Filters/Parallel/Testing/Cxx/TransmitImageData.cxx
+2
-2
Filters/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx
Filters/Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx
+1
-1
Filters/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx
Filters/Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx
+2
-2
Filters/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx
Filters/Parallel/Testing/Cxx/TransmitStructuredGrid.cxx
+2
-2
Filters/ParallelGeometry/Testing/Cxx/TestPUnstructuredGridGhostCellsGenerator.cxx
.../Testing/Cxx/TestPUnstructuredGridGhostCellsGenerator.cxx
+1
-1
Filters/Sources/Testing/Cxx/TestMultiBlock.cxx
Filters/Sources/Testing/Cxx/TestMultiBlock.cxx
+1
-1
Filters/Statistics/Testing/Cxx/TestExtractFunctionalBagPlot.cxx
...s/Statistics/Testing/Cxx/TestExtractFunctionalBagPlot.cxx
+1
-1
IO/Exodus/Testing/Cxx/TestMultiBlockExodusWrite.cxx
IO/Exodus/Testing/Cxx/TestMultiBlockExodusWrite.cxx
+4
-4
IO/Export/Testing/Cxx/TestStackedPlotGL2PS.cxx
IO/Export/Testing/Cxx/TestStackedPlotGL2PS.cxx
+1
-1
IO/Image/Testing/Cxx/TestNIFTIReaderWriter.cxx
IO/Image/Testing/Cxx/TestNIFTIReaderWriter.cxx
+2
-2
IO/Infovis/Testing/Cxx/TestDataObjectIO.cxx
IO/Infovis/Testing/Cxx/TestDataObjectIO.cxx
+2
-2
IO/Legacy/Testing/Cxx/TestLegacyCompositeDataReaderWriter.cxx
...egacy/Testing/Cxx/TestLegacyCompositeDataReaderWriter.cxx
+1
-1
IO/SQL/Testing/Cxx/TestSQLiteDatabase.cxx
IO/SQL/Testing/Cxx/TestSQLiteDatabase.cxx
+1
-1
IO/XML/Testing/Cxx/TestHyperOctreeIO.cxx
IO/XML/Testing/Cxx/TestHyperOctreeIO.cxx
+2
-2
IO/XML/Testing/Cxx/TestXML.cxx
IO/XML/Testing/Cxx/TestXML.cxx
+1
-1
Infovis/Core/Testing/Cxx/TestGraphAlgorithms.cxx
Infovis/Core/Testing/Cxx/TestGraphAlgorithms.cxx
+1
-1
Infovis/Layout/Testing/Cxx/TestGraphLayoutStrategy.cxx
Infovis/Layout/Testing/Cxx/TestGraphLayoutStrategy.cxx
+1
-1
Interaction/Widgets/Testing/Cxx/BoxWidget.cxx
Interaction/Widgets/Testing/Cxx/BoxWidget.cxx
+1
-1
Interaction/Widgets/Testing/Cxx/BoxWidget2.cxx
Interaction/Widgets/Testing/Cxx/BoxWidget2.cxx
+1
-1
Interaction/Widgets/Testing/Cxx/ImagePlaneWidget.cxx
Interaction/Widgets/Testing/Cxx/ImagePlaneWidget.cxx
+5
-5
Interaction/Widgets/Testing/Cxx/TestAffineWidget.cxx
Interaction/Widgets/Testing/Cxx/TestAffineWidget.cxx
+1
-1
Interaction/Widgets/Testing/Cxx/TestAngleWidget2D.cxx
Interaction/Widgets/Testing/Cxx/TestAngleWidget2D.cxx
+1
-1
No files found.
Charts/Core/Testing/Cxx/TestBarGraph.cxx
View file @
1c0cb29c
...
...
@@ -73,7 +73,7 @@ int TestBarGraph(int , char * [])
}
// Add multiple bar plots, setting the colors etc
vtkPlot
*
plot
=
0
;
vtkPlot
*
plot
=
nullptr
;
plot
=
chart
->
AddPlot
(
vtkChart
::
BAR
);
plot
->
SetInputData
(
table
.
GetPointer
(),
0
,
1
);
...
...
Charts/Core/Testing/Cxx/TestBarGraphHorizontal.cxx
View file @
1c0cb29c
...
...
@@ -72,8 +72,8 @@ int TestBarGraphHorizontal(int , char * [])
}
// Add multiple bar plots, setting the colors etc
vtkPlot
*
plot
=
0
;
vtkPlotBar
*
barPlot
=
0
;
vtkPlot
*
plot
=
nullptr
;
vtkPlotBar
*
barPlot
=
nullptr
;
plot
=
chart
->
AddPlot
(
vtkChart
::
BAR
);
barPlot
=
vtkPlotBar
::
SafeDownCast
(
plot
);
...
...
Charts/Core/Testing/Cxx/TestBarGraphSelection.cxx
View file @
1c0cb29c
...
...
@@ -80,7 +80,7 @@ int TestBarGraphSelection(int , char * [])
selection
->
InsertNextValue
(
5
);
// Add multiple bar plots, setting the colors etc
vtkPlot
*
plot
=
0
;
vtkPlot
*
plot
=
nullptr
;
plot
=
chart
->
AddPlot
(
vtkChart
::
BAR
);
plot
->
SetInputData
(
table
.
GetPointer
(),
0
,
1
);
...
...
Charts/Core/Testing/Cxx/TestMultipleScalarsToColors.cxx
View file @
1c0cb29c
...
...
@@ -56,7 +56,7 @@ int TestMultipleScalarsToColors(int , char * [])
0.5
,
0.5
,
1.0
,
1.0
};
// Save one of the context actors
vtkContextActor
*
actor
=
0
;
vtkContextActor
*
actor
=
nullptr
;
// Lookup Table
vtkSmartPointer
<
vtkLookupTable
>
lookupTable
=
...
...
Charts/Core/Testing/Cxx/TestStackedBarGraph.cxx
View file @
1c0cb29c
...
...
@@ -111,7 +111,7 @@ int TestStackedBarGraph(int , char * [])
colorSeries1
->
SetColorScheme
(
vtkColorSeries
::
WILD_FLOWER
);
// Add multiple line plots, setting the colors etc
vtkPlotBar
*
bar
=
0
;
vtkPlotBar
*
bar
=
nullptr
;
bar
=
vtkPlotBar
::
SafeDownCast
(
chart
->
AddPlot
(
vtkChart
::
BAR
));
bar
->
SetColorSeries
(
colorSeries1
);
...
...
Charts/Core/Testing/Cxx/TestStackedPlot.cxx
View file @
1c0cb29c
...
...
@@ -108,7 +108,7 @@ int TestStackedPlot(int , char * [])
chart
->
SetShowLegend
(
true
);
// Add multiple line plots, setting the colors etc
vtkPlotStacked
*
stack
=
0
;
vtkPlotStacked
*
stack
=
nullptr
;
// Books
stack
=
vtkPlotStacked
::
SafeDownCast
(
chart
->
AddPlot
(
vtkChart
::
STACKED
));
...
...
Common/ComputationalGeometry/Testing/Cxx/UnitTestParametricSpline.cxx
View file @
1c0cb29c
...
...
@@ -196,7 +196,7 @@ int TestErrors()
x
[
0
]
=
0.0
;
x
[
1
]
=
0.0
;
x
[
2
]
=
0.0
;
double
result
[
3
];
pspline
->
Evaluate
(
x
,
result
,
0
);
pspline
->
Evaluate
(
x
,
result
,
nullptr
);
// Check for model bounds error
if
(
errorObserver
->
GetError
())
{
...
...
@@ -211,7 +211,7 @@ int TestErrors()
errorObserver
->
Clear
();
pspline
->
SetNumberOfPoints
(
0
);
pspline
->
EvaluateScalar
(
x
,
0
,
0
);
pspline
->
EvaluateScalar
(
x
,
nullptr
,
nullptr
);
if
(
errorObserver
->
GetError
())
{
std
::
cout
<<
"Caught expected error: "
...
...
@@ -225,7 +225,7 @@ int TestErrors()
errorObserver
->
Clear
();
pspline
->
SetXSpline
(
nullptr
);
pspline
->
Evaluate
(
x
,
result
,
0
);
pspline
->
Evaluate
(
x
,
result
,
nullptr
);
if
(
errorObserver
->
GetError
())
{
std
::
cout
<<
"Caught expected error: "
...
...
Common/Core/Testing/Cxx/TestCollection.cxx
View file @
1c0cb29c
...
...
@@ -44,7 +44,7 @@ static bool IsEqual(vtkCollection* collection, const std::vector<vtkSmartPointer
{
return
false
;
}
vtkIntArray
*
dataArray
=
0
;
vtkIntArray
*
dataArray
=
nullptr
;
vtkCollectionSimpleIterator
it
;
int
i
=
0
;
for
(
collection
->
InitTraversal
(
it
);
...
...
@@ -69,14 +69,14 @@ bool TestRegister()
std
::
cout
<<
object
->
GetReferenceCount
()
<<
std
::
endl
;
return
false
;
}
object
->
Register
(
0
);
object
->
Register
(
nullptr
);
collection
->
RemoveItem
(
object
);
if
(
object
->
GetReferenceCount
()
!=
1
)
{
std
::
cout
<<
object
->
GetReferenceCount
()
<<
std
::
endl
;
return
false
;
}
object
->
UnRegister
(
0
);
object
->
UnRegister
(
nullptr
);
return
true
;
}
...
...
Common/Core/Testing/Cxx/TestGarbageCollector.cxx
View file @
1c0cb29c
...
...
@@ -51,7 +51,7 @@ protected:
if
(
this
->
Other
)
{
this
->
Other
->
UnRegister
(
this
);
this
->
Other
=
0
;
this
->
Other
=
nullptr
;
}
}
...
...
Common/Core/Testing/Cxx/TestNew.cxx
View file @
1c0cb29c
...
...
@@ -40,24 +40,24 @@ int TestNew(int,char *[])
vtkWeakPointer
<
vtkFloatArray
>
wf
;
// Test scoping, and deletion.
if
(
wf
==
0
)
if
(
wf
==
nullptr
)
{
vtkNew
<
vtkFloatArray
>
f
;
wf
=
f
.
GetPointer
();
}
if
(
wf
!=
0
)
if
(
wf
!=
nullptr
)
{
error
=
true
;
cerr
<<
"Error, vtkNew failed to delete the object it contained."
<<
endl
;
}
// Test implicit conversion vtkNew::operator T* () const
if
(
wf
==
0
)
if
(
wf
==
nullptr
)
{
vtkNew
<
vtkFloatArray
>
f
;
wf
=
f
;
}
if
(
wf
!=
0
)
if
(
wf
!=
nullptr
)
{
error
=
true
;
cerr
<<
"Error, vtkNew failed to delete the object it contained (implicit cast to raw pointer)."
...
...
@@ -66,7 +66,7 @@ int TestNew(int,char *[])
// Now test interaction with the smart pointer.
vtkSmartPointer
<
vtkIntArray
>
si
;
if
(
si
==
0
)
if
(
si
==
nullptr
)
{
vtkNew
<
vtkIntArray
>
i
;
si
=
i
.
Get
();
...
...
Common/Core/Testing/Cxx/TestSmartPointer.cxx
View file @
1c0cb29c
...
...
@@ -61,12 +61,12 @@ int TestSmartPointer(int,char *[])
testbits
=
(
testbits
<<
1
)
|
((
da2
<=
ia
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da2
>
ia
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da2
>=
ia
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
==
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
!=
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<=
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>=
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
==
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
!=
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<=
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>=
nullptr
)
?
1
:
0
);
if
(
testbits
!=
correctbits
)
{
unsigned
int
diffbits
=
(
testbits
^
correctbits
);
...
...
Common/Core/Testing/Cxx/TestSystemInformation.cxx
View file @
1c0cb29c
...
...
@@ -82,7 +82,7 @@ int TestSystemInformation(int argc, char* argv[])
"Common/Core/vtkToolkits.h"
,
"VTKConfig.cmake"
,
"Testing/Temporary/ConfigSummary.txt"
,
0
nullptr
};
cout
<<
"CTEST_FULL_OUTPUT (Avoid ctest truncation of output)"
<<
endl
;
...
...
Common/Core/Testing/Cxx/TestUnicodeStringArrayAPI.cxx
View file @
1c0cb29c
...
...
@@ -215,7 +215,7 @@ int TestErrorsAndWarnings()
array
->
AddObserver
(
vtkCommand
::
WarningEvent
,
errorObserver
);
// ERROR: Not implmented
array
->
SetVoidArray
(
0
,
1
,
1
);
array
->
SetVoidArray
(
nullptr
,
1
,
1
);
if
(
errorObserver
->
GetError
())
{
std
::
cout
<<
"Caught expected error: "
...
...
Common/Core/Testing/Cxx/TestWeakPointer.cxx
View file @
1c0cb29c
...
...
@@ -61,12 +61,12 @@ int TestWeakPointer(int,char *[])
testbits
=
(
testbits
<<
1
)
|
((
da2
<=
ia
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da2
>
ia
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da2
>=
ia
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
==
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
!=
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<=
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>=
0
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
==
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
!=
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
<=
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>
nullptr
)
?
1
:
0
);
testbits
=
(
testbits
<<
1
)
|
((
da1
>=
nullptr
)
?
1
:
0
);
if
(
testbits
!=
correctbits
)
{
unsigned
int
diffbits
=
(
testbits
^
correctbits
);
...
...
@@ -97,23 +97,23 @@ int TestWeakPointer(int,char *[])
}
cout
<<
"IntArray: "
<<
da2
<<
"
\n
"
;
if
(
da1
.
GetPointer
()
==
0
)
if
(
da1
.
GetPointer
()
==
nullptr
)
{
cerr
<<
"da1.GetPointer() is nullptr
\n
"
;
rval
=
1
;
}
if
(
da2
.
GetPointer
()
==
0
)
if
(
da2
.
GetPointer
()
==
nullptr
)
{
cerr
<<
"da2.GetPointer() is nullptr
\n
"
;
rval
=
1
;
}
if
(
da3
.
Get
()
!=
0
)
if
(
da3
.
Get
()
!=
nullptr
)
{
cerr
<<
"da3.GetPointer() is not nullptr
\n
"
;
rval
=
1
;
}
da2
=
0
;
da2
=
nullptr
;
ia
->
Delete
();
if
(
da1
.
GetPointer
()
!=
nullptr
)
...
...
Common/DataModel/Testing/Cxx/TestImageDataFindCell.cxx
View file @
1c0cb29c
...
...
@@ -57,7 +57,7 @@ inline int DoTest(
x
[
i
]
=
bounds
[
2
*
i
+
j
];
cellId
=
image
->
FindCell
(
x
,
0
,
0
,
0.0
,
subId
,
pcoords
,
weights
);
x
,
nullptr
,
0
,
0.0
,
subId
,
pcoords
,
weights
);
if
(
cellId
<
0
)
{
...
...
@@ -73,7 +73,7 @@ inline int DoTest(
x
[
i
]
=
bounds
[
2
*
i
+
j
]
+
offset
;
cellId
=
image
->
FindCell
(
x
,
0
,
0
,
0.0
,
subId
,
pcoords
,
weights
);
x
,
nullptr
,
0
,
0.0
,
subId
,
pcoords
,
weights
);
if
(
cellId
>=
0
)
{
...
...
@@ -88,7 +88,7 @@ inline int DoTest(
x
[
i
]
=
bounds
[
2
*
i
+
j
]
+
((
j
==
0
)
?
(
-
tol
*
0.5
)
:
(
tol
*
0.5
));
cellId
=
image
->
FindCell
(
x
,
0
,
0
,
tol
*
tol
,
subId
,
pcoords
,
weights
);
x
,
nullptr
,
0
,
tol
*
tol
,
subId
,
pcoords
,
weights
);
if
(
cellId
<
0
)
{
...
...
Common/DataModel/Testing/Cxx/TestImageIterator.cxx
View file @
1c0cb29c
...
...
@@ -32,7 +32,7 @@ inline int DoTest(T*)
id
->
AllocateScalars
(
VTK_DOUBLE
,
1
);
vtkImageIterator
<
T
>
*
it
=
new
vtkImageIterator
<
T
>
(
id
,
ext
);
vtkImageProgressIterator
<
T
>
*
ipt
=
new
vtkImageProgressIterator
<
T
>
(
id
,
ext
,
0
,
0
);
=
new
vtkImageProgressIterator
<
T
>
(
id
,
ext
,
nullptr
,
0
);
delete
it
;
delete
ipt
;
id
->
Delete
();
...
...
@@ -42,16 +42,16 @@ inline int DoTest(T*)
int
TestImageIterator
(
int
,
char
*
[])
{
DoTest
(
static_cast
<
char
*>
(
0
)
);
DoTest
(
static_cast
<
int
*>
(
0
)
);
DoTest
(
static_cast
<
long
*>
(
0
)
);
DoTest
(
static_cast
<
short
*>
(
0
)
);
DoTest
(
static_cast
<
float
*>
(
0
)
);
DoTest
(
static_cast
<
double
*>
(
0
)
);
DoTest
(
static_cast
<
unsigned
long
*>
(
0
)
);
DoTest
(
static_cast
<
unsigned
short
*>
(
0
)
);
DoTest
(
static_cast
<
unsigned
char
*>
(
0
)
);
DoTest
(
static_cast
<
unsigned
int
*>
(
0
)
);
DoTest
(
static_cast
<
char
*>
(
nullptr
)
);
DoTest
(
static_cast
<
int
*>
(
nullptr
)
);
DoTest
(
static_cast
<
long
*>
(
nullptr
)
);
DoTest
(
static_cast
<
short
*>
(
nullptr
)
);
DoTest
(
static_cast
<
float
*>
(
nullptr
)
);
DoTest
(
static_cast
<
double
*>
(
nullptr
)
);
DoTest
(
static_cast
<
unsigned
long
*>
(
nullptr
)
);
DoTest
(
static_cast
<
unsigned
short
*>
(
nullptr
)
);
DoTest
(
static_cast
<
unsigned
char
*>
(
nullptr
)
);
DoTest
(
static_cast
<
unsigned
int
*>
(
nullptr
)
);
return
0
;
}
Common/DataModel/Testing/Cxx/TestQuadraticPolygon.cxx
View file @
1c0cb29c
...
...
@@ -147,7 +147,7 @@ int vtkQuadraticPolygonTest::TestGetSet()
return
EXIT_FAILURE
;
}
if
(
this
->
GetFace
(
0
)
!=
0
)
if
(
this
->
GetFace
(
0
)
!=
nullptr
)
{
cerr
<<
"ERROR: quadratic polygon face is "
<<
this
->
GetFace
(
0
)
<<
", should be 0"
<<
endl
;
...
...
Common/DataModel/Testing/Cxx/TestSmoothErrorMetric.cxx
View file @
1c0cb29c
...
...
@@ -119,7 +119,7 @@ int TestSmoothErrorMetric(int argc, char* argv[])
geom
->
Update
();
//So that we can call GetRange() on the scalars
assert
(
geom
->
GetOutput
()
!=
0
);
assert
(
geom
->
GetOutput
()
!=
nullptr
);
// This creates a blue to red lut.
vtkSmartPointer
<
vtkLookupTable
>
lut
=
...
...
@@ -149,9 +149,9 @@ int TestSmoothErrorMetric(int argc, char* argv[])
mapper
->
SetInputConnection
(
geom
->
GetOutputPort
()
);
#endif
if
(
geom
->
GetOutput
()
->
GetPointData
()
!=
0
)
if
(
geom
->
GetOutput
()
->
GetPointData
()
!=
nullptr
)
{
if
(
geom
->
GetOutput
()
->
GetPointData
()
->
GetScalars
()
!=
0
)
if
(
geom
->
GetOutput
()
->
GetPointData
()
->
GetScalars
()
!=
nullptr
)
{
mapper
->
SetScalarRange
(
geom
->
GetOutput
()
->
GetPointData
()
->
GetScalars
()
->
GetRange
());
...
...
Common/DataModel/Testing/Cxx/otherImageData.cxx
View file @
1c0cb29c
...
...
@@ -597,7 +597,7 @@ int TestOID(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
vtkCell
*
found
=
id2Dxy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -614,7 +614,7 @@ int TestOID(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
id2Dxz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -631,7 +631,7 @@ int TestOID(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
id2Dyz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -646,7 +646,7 @@ int TestOID(ostream& strm)
<<
weights
[
0
]
<<
", "
<<
weights
[
1
]
<<
", "
<<
weights
[
2
]
<<
", "
<<
weights
[
3
]
<<
endl
;
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
id1Dx
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -662,7 +662,7 @@ int TestOID(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
id1Dy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -678,7 +678,7 @@ int TestOID(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
id1Dz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
Common/DataModel/Testing/Cxx/otherRectilinearGrid.cxx
View file @
1c0cb29c
...
...
@@ -686,7 +686,7 @@ int TestORG(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
vtkCell
*
found
=
rg2Dxy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -703,7 +703,7 @@ int TestORG(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
rg2Dxz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -720,7 +720,7 @@ int TestORG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
rg2Dyz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -735,7 +735,7 @@ int TestORG(ostream& strm)
<<
weights
[
0
]
<<
", "
<<
weights
[
1
]
<<
", "
<<
weights
[
2
]
<<
", "
<<
weights
[
3
]
<<
endl
;
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
rg1Dx
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -751,7 +751,7 @@ int TestORG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
rg1Dy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -767,7 +767,7 @@ int TestORG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
rg1Dz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
Common/DataModel/Testing/Cxx/otherStructuredGrid.cxx
View file @
1c0cb29c
...
...
@@ -706,7 +706,7 @@ int TestOSG(ostream& strm)
double
pcoords
[
3
],
weights
[
8
];
int
subId
;
vtkCell
*
dummyCell
=
0
;
vtkCell
*
dummyCell
=
nullptr
;
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
12.1
;
...
...
@@ -723,7 +723,7 @@ int TestOSG(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
vtkCell
*
found
=
sg2Dxy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -740,7 +740,7 @@ int TestOSG(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
sg2Dxz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -757,7 +757,7 @@ int TestOSG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
sg2Dyz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -772,7 +772,7 @@ int TestOSG(ostream& strm)
<<
weights
[
0
]
<<
", "
<<
weights
[
1
]
<<
", "
<<
weights
[
2
]
<<
", "
<<
weights
[
3
]
<<
endl
;
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
sg1Dx
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -788,7 +788,7 @@ int TestOSG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
sg1Dy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -804,7 +804,7 @@ int TestOSG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
sg1Dz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
Common/DataModel/Testing/Cxx/otherUniformGrid.cxx
View file @
1c0cb29c
...
...
@@ -597,7 +597,7 @@ int TestOUG(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
vtkCell
*
found
=
ug2Dxy
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -614,7 +614,7 @@ int TestOUG(ostream& strm)
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
ug2Dxz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -631,7 +631,7 @@ int TestOUG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
14.7
;
pcoords
[
0
]
=
pcoords
[
1
]
=
pcoords
[
2
]
=
0.0
;
weights
[
0
]
=
weights
[
1
]
=
weights
[
2
]
=
weights
[
3
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
ug2Dyz
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -646,7 +646,7 @@ int TestOUG(ostream& strm)
<<
weights
[
0
]
<<
", "
<<
weights
[
1
]
<<
", "
<<
weights
[
2
]
<<
", "
<<
weights
[
3
]
<<
endl
;
point3D
[
0
]
=
10.5
;
point3D
[
1
]
=
0.0
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;
found
=
ug1Dx
->
FindAndGetCell
(
point3D
,
dummyCell
,
0
,
0
,
subId
,
pcoords
,
weights
);
if
(
found
==
nullptr
)
{
...
...
@@ -662,7 +662,7 @@ int TestOUG(ostream& strm)
point3D
[
0
]
=
0.0
;
point3D
[
1
]
=
12.1
;
point3D
[
2
]
=
0.0
;
dummyCell
=
0
;
dummyCell
=
nullptr
;