mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-14 23:43:26 +00:00
fix
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <memory>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -218,8 +219,7 @@ namespace omath::collision
|
|||||||
static void add_edge_boundary(std::pmr::vector<Edge>& boundary, int a, int b)
|
static void add_edge_boundary(std::pmr::vector<Edge>& boundary, int a, int b)
|
||||||
{
|
{
|
||||||
// Keep edges that appear only once; erase if opposite already present
|
// Keep edges that appear only once; erase if opposite already present
|
||||||
auto itb =
|
auto itb = std::ranges::find_if(boundary, [&](const Edge& e) { return e.a == b && e.b == a; });
|
||||||
std::find_if(boundary.begin(), boundary.end(), [&](const Edge& e) { return e.a == b && e.b == a; });
|
|
||||||
if (itb != boundary.end())
|
if (itb != boundary.end())
|
||||||
boundary.erase(itb); // internal edge cancels out
|
boundary.erase(itb); // internal edge cancels out
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user