Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ::clone() to sch::S_Object #39

Merged
merged 7 commits into from
Jul 12, 2021

Conversation

gergondet
Copy link
Member

This adds a virtual clone method to S_Object so the objects can be copied from a pointer to sch::S_Object

The method is tested by cloning the universe in the unit tests. It actually revealed an issue in the implementation of S_Polyhedron and STP_BV copy operators which is also fixed by this PR

This is not the default yet and recent Boost requires it (constexpr in
boost/maths)
The first version works thanks to copy ellision because the copy
constructor for CD_Scene is broken. Rather than fixing CD_Scene (which
afaik is not used outside of the tests?), we avoid relying on copy
ellision for cloning the universes.
@gergondet gergondet merged commit 133ef66 into jrl-umi3218:master Jul 12, 2021
gergondet added a commit that referenced this pull request Jul 12, 2021
* Make the code compatible with C++17 (#37)
* Avoid infinite loops in polyhedron support function (#38)
* Add sch::S_Object::clone() (#39)
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.

1 participant