Skip to content

Fix M3: rename detail::erase_if to detail::filter#35

Merged
csparker247 merged 1 commit intodevelopfrom
fix/M3-rename-erase-if
Mar 16, 2026
Merged

Fix M3: rename detail::erase_if to detail::filter#35
csparker247 merged 1 commit intodevelopfrom
fix/M3-rename-erase-if

Conversation

@csparker247
Copy link
Copy Markdown
Member

Summary

detail::erase_if takes its container by value, filters it, and returns the filtered copy. The name conflicts with std::erase_if (C++20), which mutates in-place — misleading any reader familiar with the standard algorithm.

Renamed to detail::filter to accurately reflect the copy semantics. The library targets C++17, so keeping a named helper is appropriate in lieu of std::ranges::filter_view.

All 7 occurrences updated (1 definition + 6 call sites in HalfEdgeMesh.hpp). No behavioral change.

Test plan

  • All 6 test suites pass (ctest 100%)
  • No change in behavior

Closes #27

The function takes a container by value and returns a filtered copy,
which conflicts with the std::erase_if naming convention (in-place).
Renamed to detail::filter to accurately reflect copy semantics.

All 6 call sites updated. Library targets C++17 so a named helper
is appropriate in lieu of std::ranges::filter_view (C++20).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@csparker247 csparker247 merged commit 57b58fe into develop Mar 16, 2026
7 checks passed
@csparker247 csparker247 deleted the fix/M3-rename-erase-if branch March 16, 2026 02:54
csparker247 added a commit that referenced this pull request Mar 16, 2026
Resolved via PR #35 (renamed detail::erase_if to detail::filter).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M3] detail::erase_if is unused dead code

1 participant