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

Revert smart pointer type change in PointCloud and deprecate getMapping() #3563

Merged
merged 1 commit into from
Jan 17, 2020
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
13 changes: 8 additions & 5 deletions common/include/pcl/point_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
#include <pcl/pcl_macros.h>
#include <pcl/point_traits.h>

#include <boost/shared_ptr.hpp>

#include <algorithm>
#include <memory>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -136,7 +137,9 @@ namespace pcl

namespace detail
{
template <typename PointT> std::shared_ptr<pcl::MsgFieldMap>&
template <typename PointT>
[[deprecated("use createMapping() instead")]]
boost::shared_ptr<pcl::MsgFieldMap>&
getMapping (pcl::PointCloud<PointT>& p);
} // namespace detail

Expand Down Expand Up @@ -603,17 +606,17 @@ namespace pcl

protected:
// This is motivated by ROS integration. Users should not need to access mapping_.
std::shared_ptr<MsgFieldMap> mapping_;
[[deprecated("rewrite your code to avoid using this protected field")]] boost::shared_ptr<MsgFieldMap> mapping_;

friend std::shared_ptr<MsgFieldMap>& detail::getMapping<PointT>(pcl::PointCloud<PointT> &p);
friend boost::shared_ptr<MsgFieldMap>& detail::getMapping<PointT>(pcl::PointCloud<PointT> &p);

public:
PCL_MAKE_ALIGNED_OPERATOR_NEW
};

namespace detail
{
template <typename PointT> std::shared_ptr<pcl::MsgFieldMap>&
template <typename PointT> boost::shared_ptr<pcl::MsgFieldMap>&
getMapping (pcl::PointCloud<PointT>& p)
{
return (p.mapping_);
Expand Down