Closed Evangel63 closed 3 weeks ago
I only marked classes NonCopyable where I thought it would not make sense to copy/move them or where it is even dangerous to do so (e.g. because of internal pointers). Which class would you like to move?
JPH::DebugRenderer, it's only got JPH::Ref and UnorderedMap members, but the documentation for NonCopyable didn't say anything about moving, so I thought it was a mistake.
JPH::DebugRenderer is a singleton that you allocate once and then keep until you're done simulating. In its constructor it sets the DebugRenderer::sInstance member (= pointer to the instance). I don't really see a reason for ever wanting to move this class to a new location, so I marked it as NonCopyable.
JPH::NonCopyable (and derived classes) are missing the move operations (move construction/assignment). Is there any reason for them to be non-moveable?