-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Revert smart pointer type change in PointCloud
and deprecate getMapping()
#3563
Conversation
common/include/pcl/point_cloud.h
Outdated
@@ -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 it")]] boost::shared_ptr<MsgFieldMap> mapping_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe reword the message to include what to do instead. Like Use pcl::createMapping(vector<pcl::PCLPointField>, pcl::MsgFieldMap&) instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had this thought but was not sure since it's not a true replacement. But since you also think this way, I'll update the message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not public, but since there was a public usage, people (maintainers) who compile from source (and check warnings 😅 ) will know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the new sassy one 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yeah, sounds a bit presumptuous, but what else can I say :D Here it's not about how to create a mapping, but rather about not using PCL's protected space to store your stuff.
Even though pcl::detail::getMapping() is not officially a public API, it is used outside of PCL (in pcl_ros). Changing the smart pointer type from boost to std broke that code. This commit partially reverses the changes from PointCloudLibrary#3474, unbreaking pcl_ros. It also properly deprecates the function so that other (unknown to us) clients have time to update their code.
655d8b0
to
794c586
Compare
Even though
pcl::detail::getMapping()
is not officially a public API, it is used outside of PCL (inpcl_ros
). Changing the smart pointer type from boost to std broke that code. (More information in #2792.)This commit partially reverses the changes from #3474, unbreaking
pcl_ros
. It also properly deprecates the function so that other (unknown to us) clients have time to update their code.