Skip to content

Commit e1ace09

Browse files
committed
Ban more obselete qt methods
1 parent 8503896 commit e1ace09

File tree

3 files changed

+52
-5
lines changed

3 files changed

+52
-5
lines changed

src/3d/qgsaabb.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,20 @@
1616
#include "qgsaabb.h"
1717

1818
QgsAABB::QgsAABB( float xMin, float yMin, float zMin, float xMax, float yMax, float zMax )
19-
: xMin( xMin ), yMin( yMin ), zMin( zMin ), xMax( xMax ), yMax( yMax ), zMax( zMax )
19+
: xMin( xMin )
20+
, yMin( yMin )
21+
, zMin( zMin )
22+
, xMax( xMax )
23+
, yMax( yMax )
24+
, zMax( zMax )
2025
{
2126
// normalize coords
2227
if ( this->xMax < this->xMin )
23-
qSwap( this->xMin, this->xMax );
28+
std::swap( this->xMin, this->xMax );
2429
if ( this->yMax < this->yMin )
25-
qSwap( this->yMin, this->yMax );
30+
std::swap( this->yMin, this->yMax );
2631
if ( this->zMax < this->zMin )
27-
qSwap( this->zMin, this->zMax );
32+
std::swap( this->zMin, this->zMax );
2833
}
2934

3035
bool QgsAABB::intersects( const QgsAABB &other ) const

src/core/mesh/qgsmeshlayerinterpolator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ QgsRasterBlock *QgsMeshLayerInterpolator::block( int, const QgsRectangle &extent
203203
);
204204
}
205205

206-
if ( !qIsNaN( val ) )
206+
if ( !std::isnan( val ) )
207207
{
208208
line[k] = val;
209209
outputBlock->setIsData( j, k );

tests/code_layout/test_banned_keywords.sh

+42
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,48 @@ HINTS[15]="Use \warning instead (works correct with Python docstrings)"
5656
KEYWORDS[11]="@deprecated"
5757
HINTS[11]="Use \deprecated instead (works correct with Python docstrings)"
5858

59+
KEYWORDS[12]="\bqIsFinite("
60+
HINTS[12]="Use std::isfinite instead"
61+
62+
KEYWORDS[13]="\bqIsInf("
63+
HINTS[13]="Use std::isinf instead"
64+
65+
KEYWORDS[14]="\bqIsNaN("
66+
HINTS[14]="Use std::isnan instead"
67+
68+
KEYWORDS[15]="\bqCopy("
69+
HINTS[15]="Use std::copy instead"
70+
71+
KEYWORDS[16]="\bqCount("
72+
HINTS[16]="Use std::count instead"
73+
74+
KEYWORDS[17]="\bqEqual("
75+
HINTS[17]="Use std::equal instead"
76+
77+
KEYWORDS[18]="\bqFill("
78+
HINTS[18]="Use std::fill instead"
79+
80+
KEYWORDS[19]="\bqFind("
81+
HINTS[19]="Use std::find instead"
82+
83+
KEYWORDS[20]="\bqGreater("
84+
HINTS[20]="Use std::greater instead"
85+
86+
KEYWORDS[21]="\bqLess("
87+
HINTS[21]="Use std::less instead"
88+
89+
KEYWORDS[22]="\bqLowerBound("
90+
HINTS[22]="Use std::lower_bound instead"
91+
92+
KEYWORDS[23]="\bqStableSort("
93+
HINTS[23]="Use std::stable_sort instead"
94+
95+
KEYWORDS[24]="\bqSwap("
96+
HINTS[24]="Use std::swap instead"
97+
98+
KEYWORDS[25]="\bqUpperBound("
99+
HINTS[25]="Use std::upper_bound instead"
100+
59101
RES=
60102
DIR=$(git rev-parse --show-toplevel)
61103

0 commit comments

Comments
 (0)