Skip to content

Commit

Permalink
Fix warnings detected with "-Wnon-virtual-dtor" flag, e.g.:
Browse files Browse the repository at this point in the history
  - "warning: ‘class vpImageMorphology::vpPixelOperationMax<unsigned char>’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]"
  - "warning: ‘class vpUKSigmaDrawerAbstract’ has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]"
  • Loading branch information
s-trinh committed Jan 4, 2025
1 parent b38f92e commit 146a70b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/core/include/visp3/core/vpImageMorphology.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ class VISP_EXPORT vpImageMorphology
public:
vpPixelOperation() { }

#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
virtual ~vpPixelOperation() = default;
#endif

virtual T operator()(const T &, const T &) = 0;
};

Expand Down
2 changes: 2 additions & 0 deletions modules/core/include/visp3/core/vpUKSigmaDrawerAbstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class VISP_EXPORT vpUKSigmaDrawerAbstract

inline vpUKSigmaDrawerAbstract(const unsigned int &n) : m_n(n) { }

virtual ~vpUKSigmaDrawerAbstract() = default;

/**
* \brief Draw the sigma points according to the current mean and covariance of the state
* of the Unscented Kalman filter.
Expand Down

0 comments on commit 146a70b

Please sign in to comment.