Skip to content
Permalink
Browse files

Add overload that accepts qgissize instead of int

to avoid a lot of annoying warnings and spare
some casts
  • Loading branch information
elpaso committed Aug 8, 2018
1 parent a6d5d47 commit 6b10ffefb034f13c1eb7a41e786e8c32ef57cb42
Showing with 20 additions and 0 deletions.
  1. +10 −0 python/core/auto_generated/raster/qgsrasterblock.sip.in
  2. +10 −0 src/core/raster/qgsrasterblock.h
@@ -193,6 +193,16 @@ Check if value at position is no data
:param row: row index
:param column: column index

:return: true if value is no data *
%End

bool isNoData( qgssize row, qgssize column );
%Docstring
Check if value at position is no data

:param row: row index
:param column: column index

:return: true if value is no data *
%End

@@ -243,6 +243,16 @@ class CORE_EXPORT QgsRasterBlock
return isNoData( static_cast< qgssize >( row ) * mWidth + column );
}

/**
* \brief Check if value at position is no data
* \param row row index
* \param column column index
* \returns true if value is no data */
bool isNoData( qgssize row, qgssize column )
{
return isNoData( row * static_cast< qgssize >( mWidth )+ column );
}

/**
* \brief Check if value at position is no data
* \param index data matrix index (long type in Python)

0 comments on commit 6b10ffe

Please sign in to comment.
You can’t perform that action at this time.