Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ban more obselete qt methods
  • Loading branch information
nyalldawson committed Jun 17, 2018
1 parent 8503896 commit e1ace09
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/3d/qgsaabb.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/core/mesh/qgsmeshlayerinterpolator.cpp
Expand Up @@ -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 );
Expand Down
42 changes: 42 additions & 0 deletions tests/code_layout/test_banned_keywords.sh
Expand Up @@ -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)

Expand Down

0 comments on commit e1ace09

Please sign in to comment.