Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use nullptr in module filters #3009

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions filters/include/pcl/filters/impl/conditional_removal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ template <typename PointT>
pcl::FieldComparison<PointT>::FieldComparison (
const std::string &field_name, ComparisonOps::CompareOp op, double compare_val)
: ComparisonBase<PointT> ()
, compare_val_ (compare_val), point_data_ (NULL)
, compare_val_ (compare_val), point_data_ (nullptr)
{
field_name_ = field_name;
op_ = op;
Expand Down Expand Up @@ -93,10 +93,10 @@ pcl::FieldComparison<PointT>::FieldComparison (
template <typename PointT>
pcl::FieldComparison<PointT>::~FieldComparison ()
{
if (point_data_ != NULL)
if (point_data_ != nullptr)
{
delete point_data_;
point_data_ = NULL;
point_data_ = nullptr;
}
}

Expand Down Expand Up @@ -682,7 +682,7 @@ pcl::ConditionalRemoval<PointT>::applyFilter (PointCloud &output)
return;
}

if (condition_.get () == NULL)
if (condition_.get () == nullptr)
{
PCL_WARN ("[pcl::%s::applyFilter] No filtering condition given!\n", getClassName ().c_str ());
return;
Expand Down
4 changes: 2 additions & 2 deletions filters/include/pcl/filters/normal_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ namespace pcl
/** \brief Empty constructor. */
NormalSpaceSampling ()
: sample_ (std::numeric_limits<unsigned int>::max ())
, seed_ (static_cast<unsigned int> (time (NULL)))
, seed_ (static_cast<unsigned int> (time (nullptr)))
, binsx_ ()
, binsy_ ()
, binsz_ ()
, input_normals_ ()
, rng_uniform_distribution_ (NULL)
, rng_uniform_distribution_ (nullptr)
{
filter_name_ = "NormalSpaceSampling";
}
Expand Down
4 changes: 2 additions & 2 deletions filters/include/pcl/filters/random_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace pcl
RandomSample (bool extract_removed_indices = false) :
FilterIndices<PointT> (extract_removed_indices),
sample_ (UINT_MAX),
seed_ (static_cast<unsigned int> (time (NULL)))
seed_ (static_cast<unsigned int> (time (nullptr)))
{
filter_name_ = "RandomSample";
}
Expand Down Expand Up @@ -166,7 +166,7 @@ namespace pcl
typedef boost::shared_ptr<const RandomSample<pcl::PCLPointCloud2> > ConstPtr;

/** \brief Empty constructor. */
RandomSample () : sample_ (UINT_MAX), seed_ (static_cast<unsigned int> (time (NULL)))
RandomSample () : sample_ (UINT_MAX), seed_ (static_cast<unsigned int> (time (nullptr)))
{
filter_name_ = "RandomSample";
}
Expand Down
2 changes: 1 addition & 1 deletion filters/include/pcl/filters/sampling_surface_normal.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace pcl

/** \brief Empty constructor. */
SamplingSurfaceNormal () :
sample_ (10), seed_ (static_cast<unsigned int> (time (NULL))), ratio_ ()
sample_ (10), seed_ (static_cast<unsigned int> (time (nullptr))), ratio_ ()
{
filter_name_ = "SamplingSurfaceNormal";
srand (seed_);
Expand Down
6 changes: 3 additions & 3 deletions filters/include/pcl/filters/voxel_grid_covariance.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ namespace pcl
return ret;
}
else
return NULL;
return nullptr;
}

/** \brief Get the voxel containing point p.
Expand All @@ -335,7 +335,7 @@ namespace pcl
return ret;
}
else
return NULL;
return nullptr;
}

/** \brief Get the voxel containing point p.
Expand All @@ -362,7 +362,7 @@ namespace pcl
return ret;
}
else
return NULL;
return nullptr;

}

Expand Down