Skip to content

Commit 6b10ffe

Browse files
committedAug 8, 2018
Add overload that accepts qgissize instead of int
to avoid a lot of annoying warnings and spare some casts
1 parent a6d5d47 commit 6b10ffe

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
 

‎python/core/auto_generated/raster/qgsrasterblock.sip.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,16 @@ Check if value at position is no data
193193
:param row: row index
194194
:param column: column index
195195

196+
:return: true if value is no data *
197+
%End
198+
199+
bool isNoData( qgssize row, qgssize column );
200+
%Docstring
201+
Check if value at position is no data
202+
203+
:param row: row index
204+
:param column: column index
205+
196206
:return: true if value is no data *
197207
%End
198208

‎src/core/raster/qgsrasterblock.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,16 @@ class CORE_EXPORT QgsRasterBlock
243243
return isNoData( static_cast< qgssize >( row ) * mWidth + column );
244244
}
245245

246+
/**
247+
* \brief Check if value at position is no data
248+
* \param row row index
249+
* \param column column index
250+
* \returns true if value is no data */
251+
bool isNoData( qgssize row, qgssize column )
252+
{
253+
return isNoData( row * static_cast< qgssize >( mWidth )+ column );
254+
}
255+
246256
/**
247257
* \brief Check if value at position is no data
248258
* \param index data matrix index (long type in Python)

0 commit comments

Comments
 (0)
Please sign in to comment.