-
Notifications
You must be signed in to change notification settings - Fork 70
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
Changes from 4 commits
bc9b63b
bda4c99
83e174f
8edab7d
78a9066
e5e77c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -18,20 +18,18 @@ | |||||||
#define GZ_MATH_MECANUMDRIVEODOMETRY_HH_ | ||||||||
|
||||||||
#include <chrono> | ||||||||
#include <memory> | ||||||||
#include <gz/math/Angle.hh> | ||||||||
#include <gz/math/Export.hh> | ||||||||
#include <gz/math/config.hh> | ||||||||
#include <gz/utils/ImplPtr.hh> | ||||||||
|
||||||||
namespace gz | ||||||||
{ | ||||||||
namespace math | ||||||||
{ | ||||||||
// Inline bracket to help doxygen filtering. | ||||||||
inline namespace GZ_MATH_VERSION_NAMESPACE { | ||||||||
// Forward declarations. | ||||||||
class MecanumDriveOdometryPrivate; | ||||||||
|
||||||||
// | ||||||||
/// \class MecanumDriveOdometry MecanumDriveOdometry.hh | ||||||||
/// gz/math/MecanumDriveOdometry.hh | ||||||||
/// | ||||||||
|
@@ -59,9 +57,6 @@ namespace gz | |||||||
/// velocity mean | ||||||||
public: explicit MecanumDriveOdometry(size_t _windowSize = 10); | ||||||||
|
||||||||
/// \brief Destructor. | ||||||||
public: ~MecanumDriveOdometry(); | ||||||||
|
||||||||
/// \brief Initialize the odometry | ||||||||
/// \param[in] _time Current time. | ||||||||
public: void Init(const clock::time_point &_time); | ||||||||
|
@@ -134,18 +129,7 @@ namespace gz | |||||||
/// \return Right wheel radius in meters. | ||||||||
public: double RightWheelRadius() const; | ||||||||
|
||||||||
|
||||||||
#ifdef _WIN32 | ||||||||
// Disable warning C4251 which is triggered by | ||||||||
// std::unique_ptr | ||||||||
#pragma warning(push) | ||||||||
#pragma warning(disable: 4251) | ||||||||
#endif | ||||||||
/// \brief Private data pointer. | ||||||||
private: std::unique_ptr<MecanumDriveOdometryPrivate> dataPtr; | ||||||||
#ifdef _WIN32 | ||||||||
#pragma warning(pop) | ||||||||
#endif | ||||||||
GZ_UTILS_IMPL_PTR(dataPtr) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Here and elsewhere There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||||
}; | ||||||||
} // namespace GZ_MATH_VERSION_NAMESPACE | ||||||||
} // namespace math | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,29 +19,24 @@ | |
#define GZ_MATH_SYSTEMS_SPEEDLIMITER_HH_ | ||
|
||
#include <chrono> | ||
#include <memory> | ||
#include <gz/math/config.hh> | ||
#include "gz/math/Helpers.hh" | ||
#include <gz/utils/ImplPtr.hh> | ||
|
||
namespace gz | ||
{ | ||
namespace math | ||
{ | ||
// Inline bracket to help doxygen filtering. | ||
inline namespace GZ_MATH_VERSION_NAMESPACE { | ||
// Forward declaration. | ||
class SpeedLimiterPrivate; | ||
|
||
// | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. delete There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
/// \brief Class to limit velocity, acceleration and jerk. | ||
class GZ_MATH_VISIBLE SpeedLimiter | ||
{ | ||
/// \brief Constructor. | ||
/// There are no limits by default. | ||
public: SpeedLimiter(); | ||
|
||
/// \brief Destructor. | ||
public: ~SpeedLimiter(); | ||
|
||
/// \brief Set minimum velocity limit in m/s, usually <= 0. | ||
/// \param[in] _lim Minimum velocity. | ||
public: void SetMinVelocity(double _lim); | ||
|
@@ -130,17 +125,7 @@ inline namespace GZ_MATH_VERSION_NAMESPACE { | |
double _prevPrevVel, | ||
std::chrono::steady_clock::duration _dt) const; | ||
|
||
#ifdef _WIN32 | ||
// Disable warning C4251 which is triggered by | ||
// std::unique_ptr | ||
#pragma warning(push) | ||
#pragma warning(disable: 4251) | ||
#endif | ||
/// \brief Private data pointer. | ||
private: std::unique_ptr<SpeedLimiterPrivate> dataPtr; | ||
#ifdef _WIN32 | ||
#pragma warning(pop) | ||
#endif | ||
GZ_UTILS_IMPL_PTR(dataPtr) | ||
}; | ||
} | ||
} | ||
|
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.
delete
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.
78a9066