Skip to content

Commit

Permalink
Empty ranges is not displayed
Browse files Browse the repository at this point in the history
should be a tunable parameter
  • Loading branch information
drug007 committed Jul 14, 2024
1 parent 4547c10 commit 2acd56d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions auxil/source/auxil/model/accept_impl.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ mixin template acceptImpl()
enum hasTreePath = Visitor.treePathEnabled;
enum hasSize = Visitor.sizeCalculationEnabled;

// If the range is empty then it is not processed
// TODO: should be a tunable parameter per a node(!)
static if (dataHasStaticArrayModel!Data ||
dataHasRandomAccessRangeModel!Data ||
dataHasAssociativeArrayModel!Data)
{
if (!data.length)
return false;
}

if (visitor.doEnterNode!(order, Data)(data, this, visitor))
return true;

Expand Down

0 comments on commit 2acd56d

Please sign in to comment.