mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 17:59:26 +02:00
codetools: added TCodeCache.ClearAllModified
git-svn-id: trunk@59559 -
This commit is contained in:
parent
f275a9445c
commit
e1221dcbc2
@ -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