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

Convert boost::shared_ptr to pcl::shared_ptr #3546

Merged
merged 2 commits into from
Jan 19, 2020

Conversation

kunaltyagi
Copy link
Member

  • Provides a pcl::shared_ptr
  • Converts all references to boost::shared_ptr to pcl::shared_ptr
  • Fixes headers for successful compilation

This PR will allow for 2 PCL releases: 1.10 (with boost::shared_ptr) and 1.11 (with std::shared_ptr) with just 1 commit in the changelog.

Results achieved by:

  1. Provide the alias
  2. Copy the file in backup location
  3. for dir in `ls */ -d`; do
      grep 'boost::shared_ptr' $dir -lr | xargs sed 's/boost::shared_ptr/shared_ptr/' -i;
    done
    
  4. Copy the file back
  5. Fix compilation errors

@kunaltyagi
Copy link
Member Author

Feel free to close without merge (based on previous discussions)

@taketwo
Copy link
Member

taketwo commented Jan 17, 2020

Do you think this is ready for merging?

Could you perhaps write up some explanation (for the changelog) what the users are supposed to do with this class?

@kunaltyagi
Copy link
Member Author

kunaltyagi commented Jan 18, 2020

some explanation (for the changelog)

With pcl::shared_ptr? How about:

Starting with PCL 1.10, to ensure compatibility with future PCL releases, please use pcl::make_shared and the Class::Ptr + Class::ConstPtr type-alias instead of using direct names like{boost, std}::shared_ptr or {boost, std}::make_shared. There's also pcl::shared_ptr which offers the same abstraction for non-PCL types.

In my other projects, I actually use this abstraction (which needs explicit knowledge). I might improve that abstraction further actually.

@taketwo
Copy link
Member

taketwo commented Jan 18, 2020

Thanks for the blurb, will integrate it into the changelog.

Can you please squash formatter changes into commits? I'd like to merge soon and finally release 1.10 this weekend.

@kunaltyagi
Copy link
Member Author

Can you please squash formatter changes into commits?

Sure. I'll send the changes in a few hours. Sorry for the delay

@taketwo taketwo merged commit b0fe402 into PointCloudLibrary:master Jan 19, 2020
@SergioRAgostinho SergioRAgostinho removed their request for review April 9, 2020 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants