diff -r 6b5524b4f673 -r 38bb213f60ba predictivesearch/PcsAlgorithm/Algorithm2/src/CPsDataPluginInterface.cpp --- a/predictivesearch/PcsAlgorithm/Algorithm2/src/CPsDataPluginInterface.cpp Wed Sep 15 11:56:55 2010 +0300 +++ b/predictivesearch/PcsAlgorithm/Algorithm2/src/CPsDataPluginInterface.cpp Wed Oct 13 14:15:33 2010 +0300 @@ -15,7 +15,6 @@ * */ - // INCLUDE FILES #include "CPsDataPluginInterface.h" #include "CPsDataPlugin.h" @@ -110,8 +109,7 @@ // Instantiate plugins for all impUIds by calling // InstantiatePlugInFromImpUidL - const TInt infoArrayCount = infoArray.Count(); - for ( TInt i=0; i < infoArrayCount; i++ ) + for ( TInt i=0; iIsDataStoresSupportedL(aDataStore)) { @@ -202,8 +200,8 @@ { PRINT ( _L("Enter CPsDataPluginInterface::GetAllSupportedDataStoresL") ); - const TInt instancesCount = iPsDataPluginInstances.Count(); - for ( TInt idx = 0; idx < instancesCount; idx++ ) + + for ( TInt idx = 0; idx < iPsDataPluginInstances.Count(); idx++ ) { iPsDataPluginInstances[idx]->GetSupportedDataStoresL(aDataStores); } @@ -221,23 +219,20 @@ PRINT ( _L("Enter CPsDataPluginInterface::GetAllSupportedDataStoresL") ); - const TInt instancesCount = iPsDataPluginInstances.Count(); - for ( TInt idx = 0; idx < instancesCount; idx++ ) - { - RPointerArray dataStores; - CleanupClosePushL( dataStores ); - iPsDataPluginInstances[idx]->GetSupportedDataStoresL(dataStores); + for ( TInt idx = 0; idx < iPsDataPluginInstances.Count(); idx++ ) + { + RPointerArray aDataStores; + iPsDataPluginInstances[idx]->GetSupportedDataStoresL(aDataStores); - const TInt dataStoresCount = dataStores.Count(); - for ( TInt i(0); i < dataStoresCount; i++) - { - if ( dataStores[i]->Compare(aUri) == 0) + for( TInt i(0); iCompare(aUri) == 0) { iPsDataPluginInstances[idx]->GetSupportedDataFieldsL(aDataFields); break; - } + } } - CleanupStack::PopAndDestroy( &dataStores ); // Close + aDataStores.Reset(); } PRINT ( _L("End CPsDataPluginInterface::GetAllSupportedDataStoresL") );