From 9d8ba565d1fd454369506a525997fceb5adae349 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 10 Aug 2020 13:40:27 +0200 Subject: Allow holes in group_view array --- libbuild2/target.txx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libbuild2/target.txx') diff --git a/libbuild2/target.txx b/libbuild2/target.txx index 777653a..d304daa 100644 --- a/libbuild2/target.txx +++ b/libbuild2/target.txx @@ -28,11 +28,13 @@ namespace build2 return; } - if (g_.count != 0) // Skip empty see through groups. - { - j_ = 1; // Start from the first group member. + // Skip empty see through groups. + // + for (j_ = 1; j_ <= g_.count && g_.members[j_ - 1] == nullptr; ++j_) ; + if (j_ <= g_.count) break; - } + + g_.count = 0; } while (++i_ != r_->e_ && i_->type.see_through); } -- cgit v1.1