From 3d51487d2a0512096a895807307f99a62ea085ae Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 18 Jul 2024 11:20:43 +1000 Subject: [PATCH] Fix clang tidy warnings --- tests/src/app/testqgsidentify.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/src/app/testqgsidentify.cpp b/tests/src/app/testqgsidentify.cpp index 59d39e0935b6..11d7f7128e97 100644 --- a/tests/src/app/testqgsidentify.cpp +++ b/tests/src/app/testqgsidentify.cpp @@ -1192,7 +1192,7 @@ void TestQgsIdentify::testPointZ() const QgsPointXY mapPoint = canvas->getCoordinateTransform()->transform( 134.445567853, -23.445567853 ); std::unique_ptr< QgsMapToolIdentifyAction > action( new QgsMapToolIdentifyAction( canvas ) ); - QList result = action->identify( mapPoint.x(), mapPoint.y(), QList() << tempLayer.get() ); + QList result = action->identify( static_cast< int >( mapPoint.x() ), static_cast< int >( mapPoint.y() ), QList() << tempLayer.get() ); QCOMPARE( result.length(), 1 ); double z4979 = result.at( 0 ).mDerivedAttributes[ QStringLiteral( "Z (EPSG:4979 - WGS 84)" )].toDouble(); double z4985 = result.at( 0 ).mDerivedAttributes[ QStringLiteral( "Z (EPSG:4985 - WGS 72)" )].toDouble(); @@ -1223,7 +1223,7 @@ void TestQgsIdentify::testLineStringZ() const QgsPointXY mapPoint = canvas->getCoordinateTransform()->transform( 136.46, -23.445567853 ); std::unique_ptr< QgsMapToolIdentifyAction > action( new QgsMapToolIdentifyAction( canvas ) ); - QList result = action->identify( mapPoint.x(), mapPoint.y(), QList() << tempLayer.get() ); + QList result = action->identify( static_cast< int >( mapPoint.x() ), static_cast< int >( mapPoint.y() ), QList() << tempLayer.get() ); QCOMPARE( result.length(), 1 ); double interpolatedZ4979 = result.at( 0 ).mDerivedAttributes[ QStringLiteral( "Interpolated Z (EPSG:4979 - WGS 84)" )].toDouble(); double interpolatedZ4985 = result.at( 0 ).mDerivedAttributes[ QStringLiteral( "Interpolated Z (EPSG:4985 - WGS 72)" )].toDouble(); @@ -1258,7 +1258,7 @@ void TestQgsIdentify::testPolygonZ() const QgsPointXY mapPoint = canvas->getCoordinateTransform()->transform( 136.46, -23.445567853 ); std::unique_ptr< QgsMapToolIdentifyAction > action( new QgsMapToolIdentifyAction( canvas ) ); - QList result = action->identify( mapPoint.x(), mapPoint.y(), QList() << tempLayer.get() ); + QList result = action->identify( static_cast< int >( mapPoint.x() ), static_cast< int >( mapPoint.y() ), QList() << tempLayer.get() ); QCOMPARE( result.length(), 1 ); double interpolatedZ4979 = result.at( 0 ).mDerivedAttributes[ QStringLiteral( "Interpolated Z (EPSG:4979 - WGS 84)" )].toDouble(); double interpolatedZ4985 = result.at( 0 ).mDerivedAttributes[ QStringLiteral( "Interpolated Z (EPSG:4985 - WGS 72)" )].toDouble();