@@ -1506,7 +1506,7 @@ void QgsVectorLayer::updateFeatureAttributes( QgsFeature &f, bool all )
1506
1506
if ( mDataProvider && ( all || ( mFetchAttributes .size () > 0 && mJoinBuffer ->containsFetchJoins () ) ) )
1507
1507
{
1508
1508
int index = 0 ;
1509
- maxIndex ( mDataProvider ->fields (), index );
1509
+ QgsVectorLayerJoinBuffer::maximumIndex ( mDataProvider ->fields (), index );
1510
1510
mJoinBuffer ->updateFeatureAttributes ( f, index, all );
1511
1511
}
1512
1512
@@ -1636,7 +1636,7 @@ void QgsVectorLayer::select( QgsAttributeList attributes, QgsRectangle rect, boo
1636
1636
int maxProviderIndex = 0 ;
1637
1637
if ( mDataProvider )
1638
1638
{
1639
- maxIndex ( mDataProvider ->fields (), maxProviderIndex );
1639
+ QgsVectorLayerJoinBuffer::maximumIndex ( mDataProvider ->fields (), maxProviderIndex );
1640
1640
}
1641
1641
1642
1642
mJoinBuffer ->select ( mFetchAttributes , joinFields, maxProviderIndex );
@@ -4879,7 +4879,7 @@ void QgsVectorLayer::updateFieldMap()
4879
4879
}
4880
4880
4881
4881
int currentMaxIndex = 0 ; // maximum index of current layer
4882
- if ( !maxIndex ( mUpdatedFields , currentMaxIndex ) )
4882
+ if ( !QgsVectorLayerJoinBuffer::maximumIndex ( mUpdatedFields , currentMaxIndex ) )
4883
4883
{
4884
4884
return ;
4885
4885
}
@@ -4943,18 +4943,6 @@ void QgsVectorLayer::stopRendererV2( QgsRenderContext& rendererContext, QgsSingl
4943
4943
}
4944
4944
}
4945
4945
4946
- bool QgsVectorLayer::maxIndex ( const QgsFieldMap& fMap , int & index ) const
4947
- {
4948
- if ( fMap .size () < 1 )
4949
- {
4950
- return false ;
4951
- }
4952
- QgsFieldMap::const_iterator endIt = fMap .constEnd ();
4953
- --endIt;
4954
- index = endIt.key ();
4955
- return true ;
4956
- }
4957
-
4958
4946
void QgsVectorLayer::updateAttributeMapIndex ( QgsAttributeMap& map, int oldIndex, int newIndex ) const
4959
4947
{
4960
4948
QgsAttributeMap::const_iterator it = map.find ( oldIndex );
0 commit comments