Skip to content

Commit

Permalink
Suppress DLL interface warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Jan 11, 2022
1 parent 8ff9821 commit 11bfc35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions include/ignition/math/MovingWindowFilter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include <ignition/math/Export.hh>
#include <ignition/math/Vector3.hh>

#include <ignition/utils/SuppressWarning.hh>

#include <vector>

namespace ignition
Expand Down Expand Up @@ -65,11 +67,13 @@ namespace ignition
/// \brief For moving window smoothed value
protected: unsigned int valWindowSize = 4;

IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING
/// \brief buffer history of raw values
protected: std::vector<T> valHistory;

/// \brief iterator pointing to current value in buffer
protected: typename std::vector<T>::iterator valIter;
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING

/// \brief keep track of running sum
protected: T sum;
Expand Down
2 changes: 1 addition & 1 deletion src/MovingWindowFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ bool MovingWindowFilter<T>::WindowFilled() const
template<typename T>
T MovingWindowFilter<T>::Value() const
{
return this->sum / static_cast<double>(this->samples);
return static_cast<T>(this->sum / static_cast<double>(this->samples));
}

template class MovingWindowFilter<int>;
Expand Down

0 comments on commit 11bfc35

Please sign in to comment.