From 938f590b47ab399f9e4e7d9f3e0da9fce415356c Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Wed, 29 Jan 2025 21:25:51 +0100 Subject: [PATCH] doc and clang tidy fixes --- python/PyQt6/core/auto_generated/geometry/qgsbox3d.sip.in | 2 +- python/core/auto_generated/geometry/qgsbox3d.sip.in | 2 +- src/3d/qgsvirtualpointcloudentity_p.cpp | 4 ++-- src/core/geometry/qgsbox3d.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/PyQt6/core/auto_generated/geometry/qgsbox3d.sip.in b/python/PyQt6/core/auto_generated/geometry/qgsbox3d.sip.in index 0aac4b55e7bf..18edcd44c9c2 100644 --- a/python/PyQt6/core/auto_generated/geometry/qgsbox3d.sip.in +++ b/python/PyQt6/core/auto_generated/geometry/qgsbox3d.sip.in @@ -375,7 +375,7 @@ Expands the bbox so that it covers both the original rectangle and the given poi Converts the box to a 2D rectangle. %End - double distanceTo( const QVector3D &point ) const /Deprecated="Since 3.42. Use distanceTo() with QgsVector3D instead (QVector3D uses floats)."/; + double distanceTo( const QVector3D &point ) const /Deprecated="Since 3.42. Use distanceTo() with QgsVector3D instead (QVector3D uses floats)."/; %Docstring Returns the smallest distance between the box and the point ``point`` (returns 0 if the point is inside the box) diff --git a/python/core/auto_generated/geometry/qgsbox3d.sip.in b/python/core/auto_generated/geometry/qgsbox3d.sip.in index 0aac4b55e7bf..18edcd44c9c2 100644 --- a/python/core/auto_generated/geometry/qgsbox3d.sip.in +++ b/python/core/auto_generated/geometry/qgsbox3d.sip.in @@ -375,7 +375,7 @@ Expands the bbox so that it covers both the original rectangle and the given poi Converts the box to a 2D rectangle. %End - double distanceTo( const QVector3D &point ) const /Deprecated="Since 3.42. Use distanceTo() with QgsVector3D instead (QVector3D uses floats)."/; + double distanceTo( const QVector3D &point ) const /Deprecated="Since 3.42. Use distanceTo() with QgsVector3D instead (QVector3D uses floats)."/; %Docstring Returns the smallest distance between the box and the point ``point`` (returns 0 if the point is inside the box) diff --git a/src/3d/qgsvirtualpointcloudentity_p.cpp b/src/3d/qgsvirtualpointcloudentity_p.cpp index f8936ada1706..78bf4f8ad3b6 100644 --- a/src/3d/qgsvirtualpointcloudentity_p.cpp +++ b/src/3d/qgsvirtualpointcloudentity_p.cpp @@ -135,8 +135,8 @@ void QgsVirtualPointCloudEntity::handleSceneUpdate( const SceneContext &sceneCon // magic number 256 is the common span value for a COPC root node constexpr int SPAN = 256; - const float epsilon = std::min( box3D.width(), box3D.height() ) / SPAN; - const float distance = box3D.distanceTo( cameraPosMapCoords ); + const float epsilon = static_cast( std::min( box3D.width(), box3D.height() ) ) / SPAN; + const float distance = static_cast( box3D.distanceTo( cameraPosMapCoords ) ); const float sse = Qgs3DUtils::screenSpaceError( epsilon, distance, sceneContext.screenSizePx, sceneContext.cameraFov ); constexpr float THRESHOLD = .2; diff --git a/src/core/geometry/qgsbox3d.h b/src/core/geometry/qgsbox3d.h index ba181de58c35..d4d1d7777bc1 100644 --- a/src/core/geometry/qgsbox3d.h +++ b/src/core/geometry/qgsbox3d.h @@ -400,7 +400,7 @@ class CORE_EXPORT QgsBox3D * \since QGIS 3.18 * \deprecated QGIS 3.42. Use distanceTo() with QgsVector3D instead (QVector3D uses floats). */ - double distanceTo( const QVector3D &point ) const SIP_DEPRECATED { return distanceTo( QgsVector3D( point ) ); } + Q_DECL_DEPRECATED double distanceTo( const QVector3D &point ) const SIP_DEPRECATED { return distanceTo( QgsVector3D( point ) ); } /** * Returns the smallest distance between the box and the point \a point