Skip to content

Commit

Permalink
Enable -Wnon-virtual-dtor in pedantic mode, and remove useless virtua…
Browse files Browse the repository at this point in the history
…l qualifiers in 2 final classes
  • Loading branch information
rouault authored and nyalldawson committed Feb 16, 2020
1 parent 4422d88 commit 1f10509
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -549,6 +549,8 @@ IF (PEDANTIC)

# c++ only warnings

SET(_warnings "${_warnings} -Wnon-virtual-dtor")

# unavoidable - we can't avoid these, as older, supported compilers do not support removing the redundant move
SET(_warnings "${_warnings} -Wno-redundant-move")

Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsfeatureiterator.sip.in
Expand Up @@ -240,7 +240,7 @@ Copy constructor copies the iterator, increases ref.count
bool rewind();
bool close();

virtual bool isValid() const;
bool isValid() const;
%Docstring
Will return if this iterator is valid.
An invalid iterator was probably introduced by a failed attempt to acquire a connection
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgswkbptr.h
Expand Up @@ -169,9 +169,9 @@ class CORE_EXPORT QgsConstWkbPtr
inline const QgsConstWkbPtr &operator>>( char &v ) const { read( v ); return *this; } SIP_SKIP

//! Read a point
virtual const QgsConstWkbPtr &operator>>( QPointF &point ) const; SIP_SKIP
const QgsConstWkbPtr &operator>>( QPointF &point ) const; SIP_SKIP
//! Read a point array
virtual const QgsConstWkbPtr &operator>>( QPolygonF &points ) const; SIP_SKIP
const QgsConstWkbPtr &operator>>( QPolygonF &points ) const; SIP_SKIP

inline void operator+=( int n ) { verifyBound( n ); mP += n; } SIP_SKIP
inline void operator-=( int n ) { mP -= n; } SIP_SKIP
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfeatureiterator.h
Expand Up @@ -310,7 +310,7 @@ class CORE_EXPORT QgsFeatureIterator
*
* \since QGIS 3.0
*/
virtual bool isValid() const;
bool isValid() const;

//! find out whether the iterator is still valid or closed already
bool isClosed() const;
Expand Down

0 comments on commit 1f10509

Please sign in to comment.