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

Add const modifiers to getters of pcl::PassThrough #2524

Merged
merged 1 commit into from
Oct 8, 2018
Merged
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
32 changes: 16 additions & 16 deletions filters/include/pcl/filters/passthrough.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ namespace pcl
* \return The name of the field that will be used for filtering.
*/
inline std::string const
getFilterFieldName ()
getFilterFieldName () const
{
return (filter_field_name_);
}
Expand All @@ -139,7 +139,7 @@ namespace pcl
* \param[out] limit_max The maximum allowed field value (default = FLT_MAX).
*/
inline void
getFilterLimits (float &limit_min, float &limit_max)
getFilterLimits (float &limit_min, float &limit_max) const
{
limit_min = filter_limit_min_;
limit_max = filter_limit_max_;
Expand All @@ -156,22 +156,22 @@ namespace pcl
negative_ = limit_negative;
}

/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
* \warning This method will be removed in the future. Use getNegative() instead.
* \param[out] limit_negative true if data \b outside the interval [min; max] is to be returned, false otherwise
*/
inline void
getFilterLimitsNegative (bool &limit_negative)
getFilterLimitsNegative (bool &limit_negative) const
{
limit_negative = negative_;
}

/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
* \warning This method will be removed in the future. Use getNegative() instead.
* \return true if data \b outside the interval [min; max] is to be returned, false otherwise
*/
inline bool
getFilterLimitsNegative ()
getFilterLimitsNegative () const
{
return (negative_);
}
Expand Down Expand Up @@ -262,7 +262,7 @@ namespace pcl

/** \brief Obtain the value of the internal \a keep_organized_ parameter. */
inline bool
getKeepOrganized ()
getKeepOrganized () const
{
return (keep_organized_);
}
Expand Down Expand Up @@ -290,7 +290,7 @@ namespace pcl

/** \brief Get the name of the field used for filtering. */
inline std::string const
getFilterFieldName ()
getFilterFieldName () const
{
return (filter_field_name_);
}
Expand All @@ -306,12 +306,12 @@ namespace pcl
filter_limit_max_ = limit_max;
}

/** \brief Get the field filter limits (min/max) set by the user. The default values are -FLT_MAX, FLT_MAX.
/** \brief Get the field filter limits (min/max) set by the user. The default values are -FLT_MAX, FLT_MAX.
* \param[out] limit_min the minimum allowed field value
* \param[out] limit_max the maximum allowed field value
*/
inline void
getFilterLimits (double &limit_min, double &limit_max)
getFilterLimits (double &limit_min, double &limit_max) const
{
limit_min = filter_limit_min_;
limit_max = filter_limit_max_;
Expand All @@ -327,20 +327,20 @@ namespace pcl
filter_limit_negative_ = limit_negative;
}

/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
* \param[out] limit_negative true if data \b outside the interval [min; max] is to be returned, false otherwise
*/
inline void
getFilterLimitsNegative (bool &limit_negative)
getFilterLimitsNegative (bool &limit_negative) const
{
limit_negative = filter_limit_negative_;
}

/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
/** \brief Get whether the data outside the interval (min/max) is to be returned (true) or inside (false).
* \return true if data \b outside the interval [min; max] is to be returned, false otherwise
*/
inline bool
getFilterLimitsNegative ()
getFilterLimitsNegative () const
{
return (filter_limit_negative_);
}
Expand All @@ -351,12 +351,12 @@ namespace pcl

private:
/** \brief Keep the structure of the data organized, by setting the
* filtered points to a user given value (NaN by default).
* filtered points to a user given value (NaN by default).
*/
bool keep_organized_;

/** \brief User given value to be set to any filtered point. Casted to
* the correct field type.
* the correct field type.
*/
float user_filter_value_;

Expand Down