harvester/client/src/harvestereventobserverao.cpp
branchRCL_3
changeset 15 3cebc1a84278
parent 8 6752808b2036
child 40 910a23996aa0
equal deleted inserted replaced
14:646a02f170b9 15:3cebc1a84278
   177 	iObservers.Sort( TLinearOrder<THarvesterEventObserver>(
   177 	iObservers.Sort( TLinearOrder<THarvesterEventObserver>(
   178 			THarvesterEventObserver::CompareObserverIds ) );
   178 			THarvesterEventObserver::CompareObserverIds ) );
   179 
   179 
   180 	// Find smallest unused observer ID 
   180 	// Find smallest unused observer ID 
   181 	const TUint count = iObservers.Count();
   181 	const TUint count = iObservers.Count();
   182 	for( TUint i = 0; i < count; i++ )
   182 	for( TInt i = count - 1; i >=0; i-- )
   183 		{
   183 		{
   184 		// Return first free observer ID 
   184 		// Return first free observer ID 
   185 		if( iObservers[i]->iObserverInfo.iObserverId != i )
   185 		if( iObservers[i]->iObserverInfo.iObserverId != i )
   186 			{
   186 			{
   187 			return i;
   187 			return i;