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 ImplPtr, fix rule of 0 #608

Merged
merged 6 commits into from
Jul 18, 2024
Merged

Use ImplPtr, fix rule of 0 #608

merged 6 commits into from
Jul 18, 2024

Conversation

scpeters
Copy link
Member

🎉 New feature

Use gz/utils/ImplPtr and fix rule of 0 violations

Summary

This switches from raw data pointers to gz::utils::ImplPtr for SpeedLimiter and MecanumOdometry and deletes the destructor definitions to satisfy the rule of 0 for these classes.

Also remove some unneeded forward class declarations.

Test it

Build and run unit tests.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Move using namespace statements after private class.

Signed-off-by: Steve Peters <[email protected]>
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Jul 14, 2024
// Forward declarations.
class MecanumDriveOdometryPrivate;

//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Forward declaration.
class SpeedLimiterPrivate;

//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifdef _WIN32
#pragma warning(pop)
#endif
GZ_UTILS_IMPL_PTR(dataPtr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GZ_UTILS_IMPL_PTR(dataPtr)
/// \brief Private data pointer.
GZ_UTILS_IMPL_PTR(dataPtr)

Here and elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scpeters scpeters merged commit f0361c0 into main Jul 18, 2024
9 checks passed
@scpeters scpeters deleted the scpeters/use_implptr_8 branch July 18, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants