Skip to content

Commit

Permalink
Add lazStoreDoubleToStream function to fix mingw build
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and wonder-sk committed Jan 10, 2025
1 parent ac77049 commit 1f790af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/core/pointcloud/qgslazdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_<double>( s, position, type, value );
}

// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

std::vector< QgsLazDecoder::RequestedAttributeDetails > prepareRequestedAttributeDetails_( const QgsPointCloudAttributeCollection &requestedAttributes, QVector<QgsLazInfo::ExtraBytesAttributeDetails> &extrabytesAttr )
Expand Down
1 change: 1 addition & 0 deletions src/core/pointcloud/qgslazdecoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ template <typename T>
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
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudlayereditutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ bool QgsPointCloudLayerEditUtils::changeAttributeValue( const QgsPointCloudNodeI
for ( int i : sortedPoints )
{
// replace attribute for selected point
lazStoreToStream_<double>( ptr, i * recordSize + attributeOffset, attribute.type(), value );
lazStoreDoubleToStream( ptr, i * recordSize + attributeOffset, attribute.type(), value );
}

return mIndex.updateNodeData( {{n, data}} );;
Expand Down

0 comments on commit 1f790af

Please sign in to comment.