diff --git a/src/ce_common.pas b/src/ce_common.pas index 4c91ba17..f1781798 100644 --- a/src/ce_common.pas +++ b/src/ce_common.pas @@ -265,11 +265,6 @@ type *) function isStringDisabled(const str: string): boolean; - (** - * Deletes the duplicates in a TStrings instance. - *) - procedure deleteDups(str: TStrings); - (** * Indicates wether str is only made of blank characters *) @@ -1176,19 +1171,6 @@ begin result := true; end; -procedure deleteDups(str: TStrings); -var - i: integer; -begin - {$PUSH}{$HINTS OFF} - if str = nil then exit; - for i:= str.Count-1 downto 0 do - // if less than 0 -> not found -> unsigned -> greater than current index. - if cardinal(str.IndexOf(str[i])) < i then - str.Delete(i); - {$POP} -end; - function isBlank(const str: string): boolean; var c: char; diff --git a/src/ce_dubproject.pas b/src/ce_dubproject.pas index f18ef0ca..dadeef08 100644 --- a/src/ce_dubproject.pas +++ b/src/ce_dubproject.pas @@ -274,6 +274,10 @@ begin fConfigs := TStringList.Create; fSrcs := TStringList.Create; fImportPaths := TStringList.Create; + fSrcs.Duplicates:=TDuplicates.dupIgnore; + fImportPaths.Duplicates:=TDuplicates.dupIgnore; + fConfigs.Duplicates:=TDuplicates.dupIgnore; + fBuildTypes.Duplicates:=TDuplicates.dupIgnore; // subjProjNew(fProjectSubject, self); subjProjChanged(fProjectSubject, self); @@ -844,7 +848,6 @@ begin tryAddRelOrAbsFile(arr.Strings[i]); end; end; - deleteDups(fSrcs); // exclusions lst.Clear; getExclusion(fJSON); diff --git a/src/ce_main.pas b/src/ce_main.pas index 3e463681..834bd63d 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -2608,6 +2608,7 @@ begin ldc: dmdProc.Executable :='ldmd2' + exeExt; gdc: dmdProc.Executable :='gdmd' + exeExt; end; + TStringList(dmdproc.Parameters).Duplicates:=TDuplicates.dupIgnore; dmdproc.Parameters.Add(fDoc.fileName); if not asObj then dmdproc.Parameters.Add('-of' + fname + exeExt) @@ -2645,8 +2646,6 @@ begin LibMan.getLibFiles(nil, dmdproc.Parameters); LibMan.getLibSourcePath(nil, dmdproc.Parameters); end; - - deleteDups(dmdproc.Parameters); dmdproc.Execute; while dmdproc.Running do application.ProcessMessages; diff --git a/src/ce_nativeproject.pas b/src/ce_nativeproject.pas index b989cabb..a533230f 100644 --- a/src/ce_nativeproject.pas +++ b/src/ce_nativeproject.pas @@ -37,7 +37,7 @@ type fRunnerOldCwd: string; fLibAliases: TStringList; fConfigs: TCollection; - fSrcs, fSrcsCop: TStringList; + fSrcs: TStringList; fConfIx: Integer; fUpdateCount: NativeInt; fProjectSubject: TCEProjectSubject; @@ -151,9 +151,10 @@ begin fProjectSubject := TCEProjectSubject.create; // fLibAliases := TStringList.Create; + fLibAliases.Duplicates:=TDuplicates.dupIgnore; fSrcs := TStringList.Create; + fSrcs.Duplicates:=TDuplicates.dupIgnore; fSrcs.OnChange := @subMemberChanged; - fSrcsCop := TStringList.Create; fConfigs := TCollection.create(TCompilerConfiguration); // reset; @@ -177,7 +178,6 @@ begin fOnChange := nil; fLibAliases.Free; fSrcs.free; - fSrcsCop.Free; fConfigs.free; killProcess(fRunner); inherited;