From: <ah...@us...> - 2013-05-25 14:02:04
|
Revision: 13524 http://jvcl.svn.sourceforge.net/jvcl/?rev=13524&view=rev Author: ahuser Date: 2013-05-25 14:01:53 +0000 (Sat, 25 May 2013) Log Message: ----------- Mantis 5980: redundant loop body Modified Paths: -------------- trunk/jvcl/install/JVCLInstall/Utils.pas Modified: trunk/jvcl/install/JVCLInstall/Utils.pas =================================================================== --- trunk/jvcl/install/JVCLInstall/Utils.pas 2013-05-25 13:53:53 UTC (rev 13523) +++ trunk/jvcl/install/JVCLInstall/Utils.pas 2013-05-25 14:01:53 UTC (rev 13524) @@ -542,17 +542,15 @@ begin // remove old paths for j := 0 to High(Paths) do - for i := List.Count - 1 downto 0 do - if Paths[j] <> '' then - begin - Path := Paths[j]; - if (Pos(':', Path) = 0) and (Path[1] <> '$') then - Path := PathDelim + ExtractFileName(Dir) + PathDelim + Paths[j]; - if EndsWith(List[i], Path, True) then - List.Delete(i) - else if EndsWith(List[i], Path + '\', True) then + if Paths[j] <> '' then + begin + Path := Paths[j]; + if (Pos(':', Path) = 0) and (Path[1] <> '$') then + Path := PathDelim + ExtractFileName(Dir) + PathDelim + Paths[j]; + for i := List.Count - 1 downto 0 do + if EndsWith(List[i], Path, True) or EndsWith(List[i], Path + '\', True) then List.Delete(i); - end; + end; if Add then // add new paths This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |