mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-08 11:16:12 +02:00
codetools: added TCodeCache.ClearAllModified
git-svn-id: branches/fixes_2_0@59561 -
This commit is contained in:
parent
9b3ee1136a
commit
e09b7587c8
@ -198,6 +198,7 @@ type
|
||||
procedure Clear;
|
||||
procedure ClearAllSourceLogEntries;
|
||||
procedure ClearIncludedByEntry(const IncludeFilename: string);
|
||||
procedure ClearAllModified;
|
||||
procedure OnBufferSetFileName(Sender: TCodeBuffer;
|
||||
const OldFilename: string);
|
||||
procedure OnBufferSetScanner(Sender: TCodeBuffer);
|
||||
@ -533,6 +534,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCodeCache.ClearAllModified;
|
||||
var
|
||||
Code: TCodeBuffer;
|
||||
ANode: TAVLTreeNode;
|
||||
begin
|
||||
ANode:=FItems.FindLowest;
|
||||
while ANode<>nil do begin
|
||||
Code:=TCodeBuffer(ANode.Data);
|
||||
if Code.Modified then
|
||||
Code.Clear;
|
||||
ANode:=FItems.FindSuccessor(ANode);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCodeCache.Count: integer;
|
||||
begin
|
||||
Result:=FItems.Count;
|
||||
|
Loading…
Reference in New Issue
Block a user