14 std::sort(region.begin(), region.end());
15 if (!region.empty()) {
16 auto subtreeRootDepth = region[0].depth();
18 removeIfDepthNotEqualTo(region, subtreeRootDepth);
24 return std::vector<RowLocation>();
29 region.erase(std::remove_if(
30 region.begin(), region.end(),
31 [expectedDepth](
RowLocation const &location) ->
bool { return location.depth() != expectedDepth; }),