Skip to content

Use ImplPtr, fix rule of 0#608

Merged
scpeters merged 6 commits intomainfrom
scpeters/use_implptr_8
Jul 18, 2024
Merged

Use ImplPtr, fix rule of 0#608
scpeters merged 6 commits intomainfrom
scpeters/use_implptr_8

Conversation

@scpeters
Copy link
Copy Markdown
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.

scpeters added 4 commits July 13, 2024 23:25
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Move using namespace statements after private class.

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

//
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

delete

Copy link
Copy Markdown
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
Copy Markdown

Choose a reason for hiding this comment

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

delete

Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
@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