Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 15, 2022
1 parent f09aabc commit 6ceb8a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/raster/qgsrasterattributetablemodel.cpp
Expand Up @@ -72,7 +72,7 @@ QString QgsRasterAttributeTableModel::headerTooltip( const int section ) const
}

const QString fieldName { hNames.at( section ) };
const bool isColor { hasColor() &&section == hNames.count( ) - 1 };
const bool isColor { hasColor() && section == hNames.count( ) - 1 };

if ( isColor )
{
Expand Down Expand Up @@ -330,7 +330,7 @@ QVariant QgsRasterAttributeTableModel::data( const QModelIndex &index, int role
if ( mRat && index.isValid() && index.row() < rowCount( QModelIndex() ) && index.column() < columnCount( QModelIndex() ) )
{
const QString fieldName { headerNames().at( index.column() ) };
const bool isColorOrRamp { ( hasColor() || hasRamp() ) &&index.column() == columnCount( QModelIndex() ) - 1 };
const bool isColorOrRamp { ( hasColor() || hasRamp() ) && index.column() == columnCount( QModelIndex() ) - 1 };
bool ok;
const QgsRasterAttributeTable::Field field { mRat->fieldByName( fieldName, &ok ) };
if ( ! isColorOrRamp && ! ok )
Expand Down

0 comments on commit 6ceb8a4

Please sign in to comment.