Skip to content

Commit fde41d7

Browse files
committedMay 29, 2020
qgsgraduatedsymbolrendererwidget.cpp: remove useless nullptr checks (variable already dereferenced before)
1 parent 218a10c commit fde41d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ void QgsGraduatedSymbolRendererWidget::applyChangeToSymbol()
935935

936936
QItemSelectionModel *m = viewGraduated->selectionModel();
937937
QModelIndexList selectedIndexes = m->selectedRows( 1 );
938-
if ( m && !selectedIndexes.isEmpty() )
938+
if ( !selectedIndexes.isEmpty() )
939939
{
940940
const auto constSelectedIndexes = selectedIndexes;
941941
for ( const QModelIndex &idx : constSelectedIndexes )
@@ -1026,7 +1026,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated()
10261026

10271027
// If complexity >= oN^2, warn for big dataset (more than 50k records)
10281028
// and give the user the chance to cancel
1029-
if ( method && method->codeComplexity() > 1 && mLayer->featureCount() > 50000 )
1029+
if ( method->codeComplexity() > 1 && mLayer->featureCount() > 50000 )
10301030
{
10311031
if ( QMessageBox::Cancel == QMessageBox::question( this, tr( "Apply Classification" ), tr( "Natural break classification (Jenks) is O(n2) complexity, your classification may take a long time.\nPress cancel to abort breaks calculation or OK to continue." ), QMessageBox::Cancel, QMessageBox::Ok ) )
10321032
{
@@ -1304,7 +1304,7 @@ QList<QgsSymbol *> QgsGraduatedSymbolRendererWidget::selectedSymbols()
13041304

13051305
QItemSelectionModel *m = viewGraduated->selectionModel();
13061306
QModelIndexList selectedIndexes = m->selectedRows( 1 );
1307-
if ( m && !selectedIndexes.isEmpty() )
1307+
if ( !selectedIndexes.isEmpty() )
13081308
{
13091309
const QgsRangeList &ranges = mRenderer->ranges();
13101310
QModelIndexList::const_iterator indexIt = selectedIndexes.constBegin();

0 commit comments

Comments
 (0)
Please sign in to comment.