equal
deleted
inserted
replaced
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; |