Merge redundant methods of update
operations
#2200
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update operations for all objects that reference multiple of another objects (for example cycles, which reference multiple half-edges) had two update methods per referenced type of object: The slightly more convenient
update_*
and the slightly more flexiblereplace_*
.I've decided this redundancy isn't worth it. I've merged all of those methods, taking the name from the
update_*
methods and the signature from thereplace_*
methods. This has resulted in slightly less convenient use sites, but more simplicity overall.While not directly related to #2117, this came out of my continued experimentation with solutions for the issues I'm facing there.