Skip to content

Commit

Permalink
Remove Hidden parameter in TSlackTree
Browse files Browse the repository at this point in the history
Why is this even here? Haha :)
  • Loading branch information
slackydev committed Dec 30, 2024
1 parent 532d340 commit 15c5872
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions Source/simba.container_slacktree.pas
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ interface
*)
PNode = ^TNode;
TNode = record
split: TPoint;
l,r: Int32;
hidden: Boolean;
Split: TPoint;
L,R: Int32;
Hidden: Boolean;
end;

TNodeArray = array of TNode;
Expand All @@ -38,11 +38,9 @@ TSlackTree = record
private
function GetItem(i:Int32): PNode; inline;
public
hidden: Integer;

property items[i:Int32]: PNode read GetItem; default;

function InitBranch: Int32; inline; //dummy
function InitBranch: Int32; inline;
function Copy: TSlackTree;

procedure Init(TPA:TPointArray);
Expand Down Expand Up @@ -71,6 +69,7 @@ TSlackTree = record

PSlackTree = ^TSlackTree;


implementation

uses
Expand Down Expand Up @@ -382,12 +381,9 @@ function TSlackTree.RangeQuery(B:TBox; hide:Boolean=False): TPointArray;
SetLength(Result, length(nodes));
for i:=0 to High(nodes) do
begin
Result[i] := Nodes[i]^.split;
Result[i] := Nodes[i]^.Split;
if hide then
begin
Nodes[i]^.hidden := True;
inc(hidden);
end;
Nodes[i]^.Hidden := True;
end;
end;

Expand Down

0 comments on commit 15c5872

Please sign in to comment.