From 1f790af2d4c7afb7c05a4bba83e93b64c6f57368 Mon Sep 17 00:00:00 2001 From: uclaros Date: Wed, 8 Jan 2025 12:16:09 +0200 Subject: [PATCH] Add lazStoreDoubleToStream function to fix mingw build --- src/core/pointcloud/qgslazdecoder.cpp | 5 +++++ src/core/pointcloud/qgslazdecoder.h | 1 + src/core/pointcloud/qgspointcloudlayereditutils.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/pointcloud/qgslazdecoder.cpp b/src/core/pointcloud/qgslazdecoder.cpp index f78dc5cdf0ba..ecda055d01dc 100644 --- a/src/core/pointcloud/qgslazdecoder.cpp +++ b/src/core/pointcloud/qgslazdecoder.cpp @@ -186,6 +186,11 @@ bool lazSerialize_( char *data, size_t outputPosition, QgsPointCloudAttribute::D return true; } +bool lazStoreDoubleToStream( char *s, size_t position, QgsPointCloudAttribute::DataType type, double value ) +{ + return lazStoreToStream_( s, position, type, value ); +} + // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// std::vector< QgsLazDecoder::RequestedAttributeDetails > prepareRequestedAttributeDetails_( const QgsPointCloudAttributeCollection &requestedAttributes, QVector &extrabytesAttr ) diff --git a/src/core/pointcloud/qgslazdecoder.h b/src/core/pointcloud/qgslazdecoder.h index bb49e7703cf1..03361c949e6e 100644 --- a/src/core/pointcloud/qgslazdecoder.h +++ b/src/core/pointcloud/qgslazdecoder.h @@ -37,6 +37,7 @@ template bool lazStoreToStream_( char *s, size_t position, QgsPointCloudAttribute::DataType type, T value ); bool lazSerialize_( char *data, size_t outputPosition, QgsPointCloudAttribute::DataType outputType, const char *input, QgsPointCloudAttribute::DataType inputType, int inputSize, size_t inputPosition ); +bool lazStoreDoubleToStream( char *s, size_t position, QgsPointCloudAttribute::DataType type, double value ); class QgsLazDecoder { diff --git a/src/core/pointcloud/qgspointcloudlayereditutils.cpp b/src/core/pointcloud/qgspointcloudlayereditutils.cpp index 3018cb0073a0..28085388aa7a 100644 --- a/src/core/pointcloud/qgspointcloudlayereditutils.cpp +++ b/src/core/pointcloud/qgspointcloudlayereditutils.cpp @@ -74,7 +74,7 @@ bool QgsPointCloudLayerEditUtils::changeAttributeValue( const QgsPointCloudNodeI for ( int i : sortedPoints ) { // replace attribute for selected point - lazStoreToStream_( ptr, i * recordSize + attributeOffset, attribute.type(), value ); + lazStoreDoubleToStream( ptr, i * recordSize + attributeOffset, attribute.type(), value ); } return mIndex.updateNodeData( {{n, data}} );;