Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tidy
  • Loading branch information
elpaso committed May 22, 2023
1 parent cfb5a9d commit 15caf31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/core/testqgsvectorlayercache.cpp
Expand Up @@ -404,7 +404,7 @@ void TestVectorLayerCache::testCacheGeom()

void TestVectorLayerCache::testFullCacheWithRect()
{
QgsVectorLayerCache cache( mPointsLayer, mPointsLayer->dataProvider()->featureCount() );
QgsVectorLayerCache cache( mPointsLayer, static_cast<int>( mPointsLayer->dataProvider()->featureCount() ) );
// cache geometry
cache.setCacheGeometry( true );
QVERIFY( ! cache.hasFullCache() );
Expand Down Expand Up @@ -433,7 +433,7 @@ void TestVectorLayerCache::testMixedAttributesCache()
{

// Test cache with no subset
QgsVectorLayerCache cache( mPointsLayer, mPointsLayer->dataProvider()->featureCount() );
QgsVectorLayerCache cache( mPointsLayer, static_cast<int>( mPointsLayer->dataProvider()->featureCount() ) );
QgsFeature f;
QgsFeatureIterator it = cache.getFeatures( );
it.nextFeature( f );
Expand All @@ -442,7 +442,7 @@ void TestVectorLayerCache::testMixedAttributesCache()
QVERIFY( cache.mCache[f.id()]->allAttributesFetched() );

// Test with subset
QgsVectorLayerCache cacheSubset( mPointsLayer, mPointsLayer->dataProvider()->featureCount() );
QgsVectorLayerCache cacheSubset( mPointsLayer, static_cast<int>( mPointsLayer->dataProvider()->featureCount() ) );
cacheSubset.setCacheSubsetOfAttributes( {2} );
QgsFeatureIterator itSubset = cacheSubset.getFeatures( );
itSubset.nextFeature( f );
Expand Down Expand Up @@ -470,7 +470,7 @@ void TestVectorLayerCache::testMixedAttributesCache()
QVERIFY( ! f.attribute( 2 ).isNull() );

// Test subset with request
QgsVectorLayerCache cacheSubsetWithRequest( mPointsLayer, mPointsLayer->dataProvider()->featureCount() );
QgsVectorLayerCache cacheSubsetWithRequest( mPointsLayer, static_cast<int>( mPointsLayer->dataProvider()->featureCount() ) );
cacheSubsetWithRequest.setCacheSubsetOfAttributes( {1, 2} );
QgsFeatureRequest req;
req.setSubsetOfAttributes( { 2 } );
Expand Down

0 comments on commit 15caf31

Please sign in to comment.