replaced with bool

This commit is contained in:
2025-12-04 04:52:22 +03:00
parent d7a009eb67
commit 1964d3d36f

View File

@@ -111,7 +111,7 @@ namespace omath::collision
vertexes.emplace_back(p); vertexes.emplace_back(p);
// Mark faces visible from p and collect their horizon // Mark faces visible from p and collect their horizon
std::pmr::vector<char> to_delete(faces.size(), 0, mem_resource.get()); std::pmr::vector<bool> to_delete(faces.size(), false, mem_resource.get()); // uses single bits
std::pmr::vector<Edge> boundary{mem_resource.get()}; std::pmr::vector<Edge> boundary{mem_resource.get()};
boundary.reserve(faces.size() * 2); boundary.reserve(faces.size() * 2);
@@ -122,7 +122,7 @@ namespace omath::collision
if (visible_from(faces[i], p)) if (visible_from(faces[i], p))
{ {
const auto& rf = faces[i]; const auto& rf = faces[i];
to_delete[i] = 1; to_delete[i] = true;
add_edge_boundary(boundary, rf.i0, rf.i1); add_edge_boundary(boundary, rf.i0, rf.i1);
add_edge_boundary(boundary, rf.i1, rf.i2); add_edge_boundary(boundary, rf.i1, rf.i2);
add_edge_boundary(boundary, rf.i2, rf.i0); add_edge_boundary(boundary, rf.i2, rf.i0);