Skip to content
Permalink
Browse files
std::min fixes
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent cc57cdd commit b6aaf6dea65555d169e8d9b60e70cffeb80edd64
@@ -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();
}
@@ -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 )
{

0 comments on commit b6aaf6d

Please sign in to comment.