Skip to content

Commit

Permalink
std::min fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent cc57cdd commit b6aaf6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp
Expand Up @@ -63,7 +63,7 @@ void QgsCategorizedSymbolRendererModel::setRenderer( QgsCategorizedSymbolRendere
{
if ( mRenderer )
{
beginRemoveRows( QModelIndex(), 0, std::max( mRenderer->categories().size() - 1, 0 ) );
beginRemoveRows( QModelIndex(), 0, std::max< int >( mRenderer->categories().size() - 1, 0 ) );
mRenderer = nullptr;
endRemoveRows();
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/vector/qgsvectorlayerlegendwidget.cpp
Expand Up @@ -289,7 +289,7 @@ void QgsVectorLayerLegendWidget::applyLabelLegend()

QgsAbstractVectorLayerLabeling *labeling = layerLabeling->clone();
QStringList ids = labeling->subProviders();
int nIterations = std::min( ids.size(), mLabelLegendTreeWidget->topLevelItemCount() );
int nIterations = std::min< int >( ids.size(), mLabelLegendTreeWidget->topLevelItemCount() );

for ( int i = 0; i < nIterations; ++i )
{
Expand Down

0 comments on commit b6aaf6d

Please sign in to comment.