Skip to content

Commit

Permalink
Fix some places we should be using const ref for arguments
Browse files Browse the repository at this point in the history
(cherry picked from commit 4fe4a9e)
  • Loading branch information
nyalldawson committed Dec 16, 2024
1 parent d2cf63c commit 5206ee9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Merges the current statistics with the statistics from ``stats``
Converts the current statistics object into JSON object
%End

static QgsPointCloudStatistics fromStatisticsJson( QByteArray stats );
static QgsPointCloudStatistics fromStatisticsJson( const QByteArray &stats );
%Docstring
Creates a statistics object from the JSON object ``stats``
%End
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Merges the current statistics with the statistics from ``stats``
Converts the current statistics object into JSON object
%End

static QgsPointCloudStatistics fromStatisticsJson( QByteArray stats );
static QgsPointCloudStatistics fromStatisticsJson( const QByteArray &stats );
%Docstring
Creates a statistics object from the JSON object ``stats``
%End
Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudstatistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ QByteArray QgsPointCloudStatistics::toStatisticsJson() const
return statsDoc.toJson( QJsonDocument::Compact );
}

QgsPointCloudStatistics QgsPointCloudStatistics::fromStatisticsJson( QByteArray statsByteArray )
QgsPointCloudStatistics QgsPointCloudStatistics::fromStatisticsJson( const QByteArray &statsByteArray )
{
QJsonParseError error;
QJsonDocument document = QJsonDocument::fromJson( statsByteArray, &error );
Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudstatistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class CORE_EXPORT QgsPointCloudStatistics
QByteArray toStatisticsJson() const;

//! Creates a statistics object from the JSON object \a stats
static QgsPointCloudStatistics fromStatisticsJson( QByteArray stats );
static QgsPointCloudStatistics fromStatisticsJson( const QByteArray &stats );

#ifndef SIP_RUN
//! Returns a map object containing all the statistics
Expand Down

0 comments on commit 5206ee9

Please sign in to comment.