Skip to content
Permalink
Browse files

Ban more obselete qt methods

  • Loading branch information
nyalldawson committed Jun 17, 2018
1 parent 8503896 commit e1ace09f7601767269dd512895604705fd2a580e
Showing with 52 additions and 5 deletions.
  1. +9 −4 src/3d/qgsaabb.cpp
  2. +1 −1 src/core/mesh/qgsmeshlayerinterpolator.cpp
  3. +42 −0 tests/code_layout/test_banned_keywords.sh
@@ -16,15 +16,20 @@
#include "qgsaabb.h"

QgsAABB::QgsAABB( float xMin, float yMin, float zMin, float xMax, float yMax, float zMax )
: xMin( xMin ), yMin( yMin ), zMin( zMin ), xMax( xMax ), yMax( yMax ), zMax( zMax )
: xMin( xMin )
, yMin( yMin )
, zMin( zMin )
, xMax( xMax )
, yMax( yMax )
, zMax( zMax )
{
// normalize coords
if ( this->xMax < this->xMin )
qSwap( this->xMin, this->xMax );
std::swap( this->xMin, this->xMax );
if ( this->yMax < this->yMin )
qSwap( this->yMin, this->yMax );
std::swap( this->yMin, this->yMax );
if ( this->zMax < this->zMin )
qSwap( this->zMin, this->zMax );
std::swap( this->zMin, this->zMax );
}

bool QgsAABB::intersects( const QgsAABB &other ) const
@@ -203,7 +203,7 @@ QgsRasterBlock *QgsMeshLayerInterpolator::block( int, const QgsRectangle &extent
);
}

if ( !qIsNaN( val ) )
if ( !std::isnan( val ) )
{
line[k] = val;
outputBlock->setIsData( j, k );
@@ -56,6 +56,48 @@ HINTS[15]="Use \warning instead (works correct with Python docstrings)"
KEYWORDS[11]="@deprecated"
HINTS[11]="Use \deprecated instead (works correct with Python docstrings)"

KEYWORDS[12]="\bqIsFinite("
HINTS[12]="Use std::isfinite instead"

KEYWORDS[13]="\bqIsInf("
HINTS[13]="Use std::isinf instead"

KEYWORDS[14]="\bqIsNaN("
HINTS[14]="Use std::isnan instead"

KEYWORDS[15]="\bqCopy("
HINTS[15]="Use std::copy instead"

KEYWORDS[16]="\bqCount("
HINTS[16]="Use std::count instead"

KEYWORDS[17]="\bqEqual("
HINTS[17]="Use std::equal instead"

KEYWORDS[18]="\bqFill("
HINTS[18]="Use std::fill instead"

KEYWORDS[19]="\bqFind("
HINTS[19]="Use std::find instead"

KEYWORDS[20]="\bqGreater("
HINTS[20]="Use std::greater instead"

KEYWORDS[21]="\bqLess("
HINTS[21]="Use std::less instead"

KEYWORDS[22]="\bqLowerBound("
HINTS[22]="Use std::lower_bound instead"

KEYWORDS[23]="\bqStableSort("
HINTS[23]="Use std::stable_sort instead"

KEYWORDS[24]="\bqSwap("
HINTS[24]="Use std::swap instead"

KEYWORDS[25]="\bqUpperBound("
HINTS[25]="Use std::upper_bound instead"

RES=
DIR=$(git rev-parse --show-toplevel)

0 comments on commit e1ace09

Please sign in to comment.
You can’t perform that action at this time.