facontidavide / Bonxai

Fast, hierarchical, sparse Voxel Grid
Mozilla Public License 2.0
643 stars 53 forks source link

Add a move constructor. #31

Open arjo129 opened 3 months ago

arjo129 commented 3 months ago

This PR adds a move constructor. It is not ideal as I needed to modify the constness of some member variables. I think having a move constructor would actually be good for usability of the library. Closes #26.

facontidavide commented 3 months ago

you do NOT need to remove const to add move semantic.

You can just copy the fields, instead of moving them

arjo129 commented 3 months ago

I think the issue is with move assignment. Not the move constructor. I could use const_cast if you would like but I'm not a fan of it.