Closed pfontain closed 10 months ago
Happy to create the merge request once I'm done with other changes.
Hi @pfontain, We discussed how best to use auto
in this project and we decided that we wanted to make the code as explicit as possible to best reflect the usage of any OpenXR types as in this case.
Thank you for your feedback and pull requests.
I agree that type deduction shouldn't be overused (I usually try to follow Google's C++ Style Guide https://google.github.io/styleguide/cppguide.html#Type_deduction) but I think in this specific case the reinterpret_cast already makes it explicit. It might be worth it to create a document in the repository, I didn't find one yet, concerning code style for contributions with some of these types of decisions. Thank you for the reply and maintaining the repository :)
In OpenXRTutorial::PollEvents() the assignments from reinterpret_cast of the XrEventDataBuffer can use auto. The reinterpret_cast already makes the type explicit.