From e307881854dfe92fedc2478576487f6494bfd803 Mon Sep 17 00:00:00 2001 From: Heiko Thiel Date: Thu, 18 Apr 2019 18:37:47 +0200 Subject: [PATCH] Changes are done by run-clang-tidy -header-filter='.*' -checks='-*,modernize-use-nullptr' -fix --- examples/outofcore/example_outofcore.cpp | 2 +- examples/segmentation/example_cpc_segmentation.cpp | 4 ++-- examples/segmentation/example_lccp_segmentation.cpp | 2 +- examples/segmentation/example_supervoxels.cpp | 2 +- examples/surface/example_nurbs_viewer_surface.cpp | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/outofcore/example_outofcore.cpp b/examples/outofcore/example_outofcore.cpp index bf83e0d003b..47119b2514e 100644 --- a/examples/outofcore/example_outofcore.cpp +++ b/examples/outofcore/example_outofcore.cpp @@ -80,7 +80,7 @@ int main (int, char** argv) OutofcoreDepthFirstIterator > it (*octree); OctreeDisk::Iterator myit (*octree); - while ( *myit !=0 ) + while ( *myit !=nullptr ) { octree->printBoundingBox (**myit); myit++; diff --git a/examples/segmentation/example_cpc_segmentation.cpp b/examples/segmentation/example_cpc_segmentation.cpp index 950458077ff..743ca50a8a0 100644 --- a/examples/segmentation/example_cpc_segmentation.cpp +++ b/examples/segmentation/example_cpc_segmentation.cpp @@ -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 @@ -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"); diff --git a/examples/segmentation/example_lccp_segmentation.cpp b/examples/segmentation/example_lccp_segmentation.cpp index ff2d7dac911..0e612d395ee 100644 --- a/examples/segmentation/example_lccp_segmentation.cpp +++ b/examples/segmentation/example_lccp_segmentation.cpp @@ -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 diff --git a/examples/segmentation/example_supervoxels.cpp b/examples/segmentation/example_supervoxels.cpp index 56673e7b28f..8aac43539b6 100644 --- a/examples/segmentation/example_supervoxels.cpp +++ b/examples/segmentation/example_supervoxels.cpp @@ -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; diff --git a/examples/surface/example_nurbs_viewer_surface.cpp b/examples/surface/example_nurbs_viewer_surface.cpp index 710cfac9ddc..ecef5ec2893 100644 --- a/examples/surface/example_nurbs_viewer_surface.cpp +++ b/examples/surface/example_nurbs_viewer_surface.cpp @@ -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; @@ -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;