Skip to content

Commit

Permalink
Fix doxygen, spelling, shared_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Mar 31, 2020
1 parent be98e2f commit a2f8646
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Expand Up @@ -36,6 +36,9 @@ QgsRasterContourRenderer cannot be copied. Use clone() instead.
%End

static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) /Factory/;
%Docstring
Creates an instance of the renderer based on definition from XML (used by renderer registry)
%End

virtual void writeXml( QDomDocument &doc, QDomElement &parentElem ) const;

Expand Down Expand Up @@ -96,7 +99,7 @@ Sets the symbol of index contour lines
%Docstring
Returns by how much the renderer will scale down the request to the data provider.
For example, for a raster block 1000x500 with downscale 10, the renderer will request raster 100x50 from provider.
Higher downscale makes contour lines more simplified (at the expense of loosing some detail).
Higher downscale makes contour lines more simplified (at the expense of losing some detail).
The value of one means there will be no downscaling.
%End

Expand Down
2 changes: 1 addition & 1 deletion src/core/raster/qgsrastercontourrenderer.cpp
Expand Up @@ -148,7 +148,7 @@ QgsRasterBlock *QgsRasterContourRenderer::block( int bandNo, const QgsRectangle
int inputWidth = static_cast<int>( round( width / mDownscale ) );
int inputHeight = static_cast<int>( round( height / mDownscale ) );

std::shared_ptr< QgsRasterBlock > inputBlock( mInput->block( mInputBand, extent, inputWidth, inputHeight, feedback ) );
std::unique_ptr< QgsRasterBlock > inputBlock( mInput->block( mInputBand, extent, inputWidth, inputHeight, feedback ) );
if ( !inputBlock || inputBlock->isEmpty() )
{
QgsDebugMsg( QStringLiteral( "No raster data!" ) );
Expand Down
3 changes: 2 additions & 1 deletion src/core/raster/qgsrastercontourrenderer.h
Expand Up @@ -41,6 +41,7 @@ class CORE_EXPORT QgsRasterContourRenderer : public QgsRasterRenderer

QgsRasterContourRenderer *clone() const override SIP_FACTORY;

//! Creates an instance of the renderer based on definition from XML (used by renderer registry)
static QgsRasterRenderer *create( const QDomElement &elem, QgsRasterInterface *input ) SIP_FACTORY;

void writeXml( QDomDocument &doc, QDomElement &parentElem ) const override;
Expand Down Expand Up @@ -79,7 +80,7 @@ class CORE_EXPORT QgsRasterContourRenderer : public QgsRasterRenderer
/**
* Returns by how much the renderer will scale down the request to the data provider.
* For example, for a raster block 1000x500 with downscale 10, the renderer will request raster 100x50 from provider.
* Higher downscale makes contour lines more simplified (at the expense of loosing some detail).
* Higher downscale makes contour lines more simplified (at the expense of losing some detail).
* The value of one means there will be no downscaling.
*/
double downscale() const { return mDownscale; }
Expand Down

0 comments on commit a2f8646

Please sign in to comment.