Skip to content

Commit ced905f

Browse files
authored
Deprecate MovingWindowFilter, use gz-math instead (#692)
Signed-off-by: Steve Peters <[email protected]>
1 parent f782186 commit ced905f

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

Migration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ Deprecated code produces compile-time warnings. These warning serve as
55
notification to users that their code should be upgraded. The next major
66
release will remove the deprecated code.
77

8+
## Gazebo Common 6.X to 7.X
9+
10+
1. The major version has been removed from the cmake project name and the
11+
package.xml package name. Use `find_package(gz-common)` instead of
12+
`find_package(gz-commonX)` going forward.
13+
14+
### Deprecations
15+
16+
1. `gz::common::MovingWindowFilter` is deprecated since the functionality
17+
was moved to gz-math. Please use `gz::math::MovingWindowFilter` instead.
18+
819
## Gazebo Common 5.X to 6.X
920

1021
### Modifications

include/gz/common/MovingWindowFilter.hh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <memory>
2121
#include <vector>
22+
#include <gz/common/Export.hh>
2223

2324
namespace gz
2425
{
@@ -65,10 +66,10 @@ namespace gz
6566
class MovingWindowFilter
6667
{
6768
/// \brief Constructor
68-
public: MovingWindowFilter();
69+
public: GZ_DEPRECATED(7) MovingWindowFilter();
6970

7071
/// \brief Destructor
71-
public: virtual ~MovingWindowFilter();
72+
public: GZ_DEPRECATED(7) virtual ~MovingWindowFilter();
7273

7374
/// \brief Update value of filter
7475
/// \param[in] _val new raw value
@@ -92,7 +93,7 @@ namespace gz
9293

9394
/// \brief Allow subclasses to initialize their own data pointer.
9495
/// \param[in] _d Reference to data pointer.
95-
protected: explicit MovingWindowFilter<T>(
96+
protected: GZ_DEPRECATED(7) explicit MovingWindowFilter(
9697
MovingWindowFilterPrivate<T> &_d);
9798

9899
/// \brief Data pointer.

src/MovingWindowFilter_TEST.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@
1717

1818
#include <gtest/gtest.h>
1919
#include <gz/math/Vector3.hh>
20+
#include <gz/utils/SuppressWarning.hh>
2021

2122
#include "gz/common/MovingWindowFilter.hh"
2223

2324
using namespace gz;
2425

26+
GZ_UTILS_WARN_IGNORE__DEPRECATED_DECLARATION
27+
2528
/////////////////////////////////////////////////
2629
TEST(MovingWindowFilterTest, SetWindowSize)
2730
{
@@ -69,3 +72,4 @@ TEST(MovingWindowFilterTest, FilterSomething)
6972
3.0*static_cast<double>(i));
7073
EXPECT_EQ(vectorMWF.Value(), vsum / 20.0);
7174
}
75+
GZ_UTILS_WARN_RESUME__DEPRECATED_DECLARATION

0 commit comments

Comments
 (0)