GDALRasterBand *GDALDefaultOverviews::GetMaskBand( int nBand ) { const int nFlags = GetMaskFlags( nBand ); if( nFlags == 0x8000 ) // Secret code meaning we don't handle this band. return NULL; if( nFlags & GMF_PER_DATASET ) return poMaskDS->GetRasterBand(1); if( nBand > 0 ) return poMaskDS->GetRasterBand( nBand ); return NULL; }
GDALRasterBand *GDALDefaultOverviews::GetMaskBand( int nBand ) { const int nFlags = GetMaskFlags( nBand ); if( poMaskDS == nullptr || nFlags == MISSING_FLAGS ) return nullptr; if( nFlags & GMF_PER_DATASET ) return poMaskDS->GetRasterBand(1); if( nBand > 0 ) return poMaskDS->GetRasterBand( nBand ); return nullptr; }