Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005980 [JEDI VCL] 02 Installation trivial always 2012-09-03 13:30 2015-09-21 17:47
Reporter Arioch View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0005980: redundant loop body
Description D:\DelphiProjects\Libs\JediVCL\jvcl\install\JVCLInstall\Utils.pas

procedure AddPaths(List: TStrings; Add: Boolean; const Dir: string;
  const Paths: array of string);


1st loop is re-calculating Path local var when it did not changed.


Additionally, either to use hardcoded '\' or x-platform PathDelim;
Additional Information Better code :

  for j := 0 to High(Paths) do begin
    Path := Paths[j];
    if Path <> '' then
    begin
      if (Pos(':', Path) = 0) and (Path[1] <> '$') then
        Path := PathDelim + ExtractFileName(Dir) + PathDelim + Paths[j];
      for i := List.Count - 1 downto 0 do begin
          if EndsWith(List[i], Path, True) then
            List.Delete(i)
          else if EndsWith(List[i], Path + PathDelim, True) then
            List.Delete(i);
      end;
     end;
    end;
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0020357)
obones (administrator)
2013-01-15 15:29

Please check with latest SVN content, Andreas may have changed it already.
(0020398)
Arioch (developer)
2013-01-16 11:07

no, this both issues remain and file header still claims
// $Id: Utils.pas 13148 2011-11-05 17:27:59Z ahuser $
(0020511)
AHUser (developer)
2013-05-25 16:02

Corrected in svn revision 13524.

- Issue History
Date Modified Username Field Change
2012-09-03 13:30 Arioch New Issue
2013-01-15 15:29 obones Note Added: 0020357
2013-01-15 15:29 obones Status new => acknowledged
2013-01-16 11:07 Arioch Note Added: 0020398
2013-05-25 16:02 AHUser Note Added: 0020511
2013-05-25 16:02 AHUser Status acknowledged => resolved
2013-05-25 16:02 AHUser Fixed in Version => Daily / SVN
2013-05-25 16:02 AHUser Resolution open => fixed
2013-05-25 16:02 AHUser Assigned To => AHUser
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker