mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 04:39:24 +02:00
MG: fixed unique code lists
git-svn-id: trunk@3519 -
This commit is contained in:
parent
85b9ae6942
commit
6543bb78ea
@ -434,9 +434,9 @@ begin
|
||||
m:=0;
|
||||
while r>=l do begin
|
||||
m:=(l+r) shr 1;
|
||||
if UniqueSortedCodeList[m]<ACode then
|
||||
if ACode<UniqueSortedCodeList[m] then
|
||||
r:=m-1
|
||||
else 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
|
||||
if ACode<UniqueSortedCodeList[m] then
|
||||
r:=m-1
|
||||
else if UniqueSortedCodeList[m]>ACode then
|
||||
else if ACode>UniqueSortedCodeList[m] then
|
||||
l:=m+1
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
if (m<UniqueSortedCodeList.Count) and (UniqueSortedCodeList[m]<ACode) then
|
||||
if (m<UniqueSortedCodeList.Count) and (ACode>UniqueSortedCodeList[m]) then
|
||||
inc(m);
|
||||
UniqueSortedCodeList.Insert(m,ACode);
|
||||
end;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user