mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-21 00:03:03 -04:00
Replace use of qt methods with std equivalents
This commit is contained in:
parent
1d01d4bc5d
commit
00e869039b
@ -19,8 +19,8 @@
|
||||
#include "qgsfeaturepool.h"
|
||||
|
||||
QgsGeometryCheckerContext::QgsGeometryCheckerContext( int _precision, const QString &_mapCrs, const QMap<QString, QgsFeaturePool *> &_featurePools )
|
||||
: tolerance( qPow( 10, -_precision ) )
|
||||
, reducedTolerance( qPow( 10, -_precision / 2 ) )
|
||||
: tolerance( std::pow( 10, -_precision ) )
|
||||
, reducedTolerance( std::pow( 10, -_precision / 2 ) )
|
||||
, mapCrs( _mapCrs )
|
||||
, featurePools( _featurePools )
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ void QgsGeometryOverlapCheck::fixError( QgsGeometryCheckError *error, int method
|
||||
for ( int iPart = 0, nParts = interGeom->partCount(); iPart < nParts; ++iPart )
|
||||
{
|
||||
QgsAbstractGeometry *part = QgsGeometryCheckerUtils::getGeomPart( interGeom, iPart );
|
||||
if ( qAbs( part->area() - overlapError->value().toDouble() ) < mContext->reducedTolerance &&
|
||||
if ( std::fabs( part->area() - overlapError->value().toDouble() ) < mContext->reducedTolerance &&
|
||||
QgsGeometryCheckerUtils::pointsFuzzyEqual( part->centroid(), overlapError->location(), mContext->reducedTolerance ) )
|
||||
{
|
||||
interPart = part;
|
||||
|
@ -42,7 +42,7 @@ class ANALYSIS_EXPORT QgsGeometryOverlapCheckError : public QgsGeometryCheckErro
|
||||
other->featureId() == featureId() &&
|
||||
err->overlappedFeature() == overlappedFeature() &&
|
||||
QgsGeometryCheckerUtils::pointsFuzzyEqual( location(), other->location(), mCheck->getContext()->reducedTolerance ) &&
|
||||
qAbs( value().toDouble() - other->value().toDouble() ) < mCheck->getContext()->reducedTolerance;
|
||||
std::fabs( value().toDouble() - other->value().toDouble() ) < mCheck->getContext()->reducedTolerance;
|
||||
}
|
||||
|
||||
bool closeMatch( QgsGeometryCheckError *other ) const override
|
||||
|
@ -20,7 +20,7 @@ bool QgsGeometrySliverPolygonCheck::checkThreshold( double layerToMapUnits, cons
|
||||
{
|
||||
double maxArea = mMaxAreaMapUnits / ( layerToMapUnits * layerToMapUnits );
|
||||
QgsRectangle bb = geom->boundingBox();
|
||||
double maxDim = qMax( bb.width(), bb.height() );
|
||||
double maxDim = std::max( bb.width(), bb.height() );
|
||||
double area = geom->area();
|
||||
value = ( maxDim * maxDim ) / area;
|
||||
if ( maxArea > 0. && area > maxArea )
|
||||
|
@ -1855,7 +1855,7 @@ namespace QgsWms
|
||||
QList<QColor> bufferColors = toColorList( toStringList( ParameterName::HIGHLIGHT_LABELBUFFERCOLOR, mapId, ';' ), ParameterName::HIGHLIGHT_LABELBUFFERCOLOR, mapId );
|
||||
QList<float> bufferSizes = toFloatList( toStringList( ParameterName::HIGHLIGHT_LABELBUFFERSIZE, mapId, ';' ), ParameterName::HIGHLIGHT_LABELBUFFERSIZE, mapId );
|
||||
|
||||
int nHLayers = qMin( geoms.size(), slds.size() );
|
||||
int nHLayers = std::min( geoms.size(), slds.size() );
|
||||
for ( int i = 0; i < nHLayers; i++ )
|
||||
{
|
||||
QgsWmsParametersHighlightLayer hParam;
|
||||
|
@ -347,7 +347,7 @@ void TestQgsWcsPublicServers::test()
|
||||
myVersionLog << QStringLiteral( "totalCoverages:%1" ).arg( myCoverages.size() );
|
||||
|
||||
int myCoverageCount = 0;
|
||||
int myStep = myCoverages.size() / qMin( mMaxCoverages, myCoverages.size() );
|
||||
int myStep = myCoverages.size() / std::min( mMaxCoverages, myCoverages.size() );
|
||||
int myStepCount = -1;
|
||||
bool myCoverageFound = false;
|
||||
Q_FOREACH ( QgsWcsCoverageSummary myCoverage, myCoverages )
|
||||
|
Loading…
x
Reference in New Issue
Block a user