diff --git a/components/codetools/linkscanner.pas b/components/codetools/linkscanner.pas index 54467c4906..ebbb5fcddc 100644 --- a/components/codetools/linkscanner.pas +++ b/components/codetools/linkscanner.pas @@ -434,9 +434,9 @@ begin m:=0; while r>=l do begin m:=(l+r) shr 1; - if UniqueSortedCodeList[m]ACode then + else if ACode>UniqueSortedCodeList[m] then l:=m+1 else begin Result:=m; @@ -454,14 +454,14 @@ begin m:=0; while r>=l do begin m:=(l+r) shr 1; - if UniqueSortedCodeList[m]ACode then + else if ACode>UniqueSortedCodeList[m] then l:=m+1 else exit; end; - if (mUniqueSortedCodeList[m]) then inc(m); UniqueSortedCodeList.Insert(m,ACode); end; diff --git a/components/codetools/sourcechanger.pas b/components/codetools/sourcechanger.pas index 4dce6237c3..d9c6b3cd1a 100644 --- a/components/codetools/sourcechanger.pas +++ b/components/codetools/sourcechanger.pas @@ -776,7 +776,7 @@ end; function TSourceChangeCache.BufferIsModified(ACode: TCodeBuffer): boolean; begin UpdateBuffersToModify; - Result:=FBuffersToModify.IndexOf(ACode)>=0; + Result:=IndexOfCodeInUniqueList(ACode,FBuffersToModify)>=0; end; procedure TSourceChangeCache.UpdateBuffersToModify; diff --git a/components/codetools/stdcodetools.pas b/components/codetools/stdcodetools.pas index 4f9c9e1bde..46dad42e11 100644 --- a/components/codetools/stdcodetools.pas +++ b/components/codetools/stdcodetools.pas @@ -1130,9 +1130,9 @@ function TStandardCodeTool.ReplaceIdentifiers(IdentList: TStrings; begin // identifier found -> replace IdentEnd:=IdentStart+length(IdentList[i]); - writeln('TStandardCodeTool.ReplaceIdentifiers replacing: ', - ' "',copy(CurSource,IdentStart,IdentEnd-IdentStart),'" -> "',IdentList[i+1],'" at ',IdentStart - ); + //writeln('TStandardCodeTool.ReplaceIdentifiers replacing: ', + //' "',copy(CurSource,IdentStart,IdentEnd-IdentStart),'" -> "',IdentList[i+1],'" at ',IdentStart + //); SourceChangeCache.ReplaceEx(gtNone,gtNone,1,1, ACode,IdentStart,IdentEnd,IdentList[i+1]); break;