AIRLegend / aitrack

6DoF Head tracking software
MIT License
1.07k stars 107 forks source link

Improve exception safety with smart pointers #28

Closed elfring closed 4 years ago

elfring commented 4 years ago

Would you like to wrap any pointer data members with the class template “std::unique_ptr”?

AIRLegend commented 4 years ago

I don't think it's worth the effort on that class. The only public member which is worth of checking not nullptr is PositionSolver. Maybe a shared_ptr or a getter/setter for updating it and rising an exception in case of wrong set. However, I think it's better to delegate that on the caller (aka. TrackerWrapper and TrackerFactory).

On the other hand, I think the Client/part would be worth to refactor a little bit. If you want to give it a try, it'll be welcome :)

rbroker commented 4 years ago

I don't mind taking a look at the client part.

elfring commented 4 years ago

How do you think about to integrate any evolving software development approaches?

AIRLegend commented 4 years ago

What do you specifically mean? @elfring

elfring commented 4 years ago

@rbroker published a software development approach which looks promising.