Skip to content

Commit

Permalink
commits on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
barendgehrels committed Jan 23, 2024
1 parent 31e4145 commit 0006251
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 26 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

endif()

add_subdirectory(tickets)
add_subdirectory(research)
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ struct buffered_piece_collection

detail::sectionalize::enlarge_sections(monotonic_sections, m_strategy);

partition_lambda<robust_box_type>(monotonic_sections,
partition_lambda_one_range<robust_box_type>(monotonic_sections,
[&strategy](auto& box, auto const& section)
{
geometry::expand(box, section.bounding_box, strategy);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,12 @@ inline void assign_parents(Geometry1 const& geometry1,
}
}

// WORKAROUND for gcc 5-7, not able to recognize static const variables in lambdas.
bool const cfo = check_for_orientation;
// END WORKAROUND
auto assign_to_map = [&](auto const& outer, auto const& inner)
{
if (check_for_orientation
if (cfo
|| (math::larger(outer.real_area, 0) && math::smaller(inner.real_area, 0)))
{
auto& inner_in_map = ring_map[inner.id];
Expand All @@ -258,7 +261,7 @@ inline void assign_parents(Geometry1 const& geometry1,
return true;
};

partition_lambda
partition_lambda_one_range
<
box_type
>(vector,
Expand Down
45 changes: 24 additions & 21 deletions include/boost/geometry/algorithms/detail/overlay/get_turns.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,29 +494,32 @@ class get_turns_generic
std::decay_t<decltype(section2)>,
TurnPolicy
>::apply(source_id1, geometry1, section1,
source_id2, geometry2, section2,
false, false,
strategy,
robust_policy,
turns, interrupt_policy);
source_id2, geometry2, section2,
false, false,
strategy,
robust_policy,
turns, interrupt_policy);
};

auto expand_box = [&strategy](auto& box, auto const& section)
{
geometry::expand(box, section.bounding_box, strategy);
};
auto overlaps_box = [&strategy](auto const& box, auto const& section)
{
return ! detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy);
};

partition_lambda
<
box_type
>(sec1, sec2,
expand_box, overlaps_box,
expand_box, overlaps_box,
visit_sections);
partition_lambda<box_type>(
sec1, sec2,
[&strategy](auto& box, auto const& sec)
{
geometry::expand(box, sec.bounding_box, strategy);
},
[&strategy](auto const& box, auto const& section)
{
return !detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy);
},
[&strategy](auto& b, auto const& s)
{
geometry::expand(b, s.bounding_box, strategy);
},
[&strategy](auto const& box, auto const& section)
{
return !detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy);
},
visit_sections);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct get_turns
return ! detail::disjoint::disjoint_box_box(box, section.bounding_box, strategy);
};

partition_lambda
partition_lambda_one_range
<
box_type
>(sections, expand_box, overlaps_box, visit_sections);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ template
typename BoxType,
typename ForwardRange
>
bool partition_lambda(ForwardRange const& forward_range,
bool partition_lambda_one_range(ForwardRange const& forward_range,
const std::function
<
void(BoxType&,
Expand Down

0 comments on commit 0006251

Please sign in to comment.