locationtriggering/ltstrategyengine/src/lbtcelliddatabase.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 0 667063e416a2
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
   127                                      iCellIdDbArray[i].iLocality.Altitude() );
   127                                      iCellIdDbArray[i].iLocality.Altitude() );
   128             aLocality.SetHorizontalAccuracy( iCellIdDbArray[i].iLocality.HorizontalAccuracy() );
   128             aLocality.SetHorizontalAccuracy( iCellIdDbArray[i].iLocality.HorizontalAccuracy() );
   129             
   129             
   130             // This entry has been used and should be deleted last compared to 
   130             // This entry has been used and should be deleted last compared to 
   131             // unused entry. This is pushed to the end because we delete 
   131             // unused entry. This is pushed to the end because we delete 
   132             // entry from first when max cap is reached.
   132             // entry from first when max cap is reached.Remove operation should be 
   133             iCellIdDbArray.Append( iCellIdDbArray[i] );
   133             // performed only if append succeeds
   134             iCellIdDbArray.Remove( i );
   134             TInt error = iCellIdDbArray.Append( iCellIdDbArray[i] );
       
   135             if( error == KErrNone )
       
   136                 {
       
   137                 iCellIdDbArray.Remove( i );
       
   138                 }
   135             
   139             
   136             return KErrNone;
   140             return KErrNone;
   137             }
   141             }
   138         }
   142         }
   139     return KErrNotFound;
   143     return KErrNotFound;