Skip to content

Commit

Permalink
Merge pull request #3007 from SunBlack/modernize-use-nullptr_examples
Browse files Browse the repository at this point in the history
Use nullptr in module examples
  • Loading branch information
SergioRAgostinho authored Apr 22, 2019
2 parents 4330977 + e307881 commit 6f748f0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/outofcore/example_outofcore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main (int, char** argv)
OutofcoreDepthFirstIterator<pcl::PointXYZ, pcl::outofcore::OutofcoreOctreeDiskContainer<pcl::PointXYZ> > it (*octree);
OctreeDisk::Iterator myit (*octree);

while ( *myit !=0 )
while ( *myit !=nullptr )
{
octree->printBoundingBox (**myit);
myit++;
Expand Down
4 changes: 2 additions & 2 deletions examples/segmentation/example_cpc_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ CPCSegmentation Parameters: \n\
const unsigned char concave_color [3] = {255, 0, 0};
const unsigned char cut_color [3] = { 0,255, 0};
const unsigned char* convex_color = bg_white ? black_color : white_color;
const unsigned char* color = NULL;
const unsigned char* color = nullptr;

//The vertices in the supervoxel adjacency list are the supervoxel centroids
//This iterates through them, finding the edges
Expand Down Expand Up @@ -529,7 +529,7 @@ CPCSegmentation Parameters: \n\
pcl::visualization::PCLVisualizer::Ptr viewer (new pcl::visualization::PCLVisualizer ("3D Viewer"));
float bg_color = bg_white?1:0;
viewer->setBackgroundColor (bg_color, bg_color, bg_color);
viewer->registerKeyboardCallback (keyboardEventOccurred, 0);
viewer->registerKeyboardCallback (keyboardEventOccurred, nullptr);
viewer->addPointCloud (cpc_labeled_cloud, "cpc_cloud");
/// Visualization Loop
PCL_INFO ("Loading viewer\n");
Expand Down
2 changes: 1 addition & 1 deletion examples/segmentation/example_lccp_segmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ LCCPSegmentation Parameters: \n\
/// Configure Visualizer
pcl::visualization::PCLVisualizer::Ptr viewer (new pcl::visualization::PCLVisualizer ("3D Viewer"));
viewer->setBackgroundColor (0, 0, 0);
viewer->registerKeyboardCallback (keyboardEventOccurred, 0);
viewer->registerKeyboardCallback (keyboardEventOccurred, nullptr);
viewer->addPointCloud (lccp_labeled_cloud, "maincloud");

/// Visualization Loop
Expand Down
2 changes: 1 addition & 1 deletion examples/segmentation/example_supervoxels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ main (int argc, char ** argv)
std::cout << "Loading visualization...\n";
pcl::visualization::PCLVisualizer::Ptr viewer (new pcl::visualization::PCLVisualizer ("3D Viewer"));
viewer->setBackgroundColor (0, 0, 0);
viewer->registerKeyboardCallback(keyboard_callback, 0);
viewer->registerKeyboardCallback(keyboard_callback, nullptr);


bool refined_normal_shown = show_refined;
Expand Down
4 changes: 2 additions & 2 deletions examples/surface/example_nurbs_viewer_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ main (int argc, char *argv[])
}

const ON_Object* on_object = on_model.m_object_table[0].m_object;
if(on_object==NULL)
if(on_object==nullptr)
{
std::cout << "object[0] not valid." << std::endl;
return -1;
Expand All @@ -68,7 +68,7 @@ main (int argc, char *argv[])
else
{
on_object = on_model.m_object_table[1].m_object;
if(on_object==NULL)
if(on_object==nullptr)
{
std::cout << "object[1] not valid." << std::endl;
return -1;
Expand Down

0 comments on commit 6f748f0

Please sign in to comment.