Blender Git Loki
Git Commits -> Revision 2d65336
Revision 2d65336 by Julian Eisel (master) August 14, 2020, 10:37 (GMT) |
Cleanup: C++ code style for Ghost-XR * Avoid deep copy of vectors (technically more than a cleanup). * Use `std::make_unique` for allocating unique pointers, rather than manual `new`. * Use `std::optional` for optional by-value return values, rather than C-style `bool` to indicate success + return-argument. * Use references rather than pointers for non-optional arguments. * Avoid manual `new`/`delete`. Use `std::unique_ptr` for local scope bound lifetime. * Use C++ `nullptr` rather than C's `NULL`. * Remove unnecessary friend declaration. These changes are generally considered good practise and move us more to a "modern C++" style. We can still go much further of course. See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines. |
Commit Details:
Full Hash: 2d653364086d62cc9b503724c962cc466ad3e4b4
Parent Commit: 1ff1b7f
Lines Changed: +122, -131
9 Modified Paths:
/intern/ghost/intern/GHOST_IXRGraphicsBinding.h (+8, -11) (Diff)
/intern/ghost/intern/GHOST_XR.cpp (+3, -4) (Diff)
/intern/ghost/intern/GHOST_XrContext.cpp (+6, -6) (Diff)
/intern/ghost/intern/GHOST_XrContext.h (+1, -1) (Diff)
/intern/ghost/intern/GHOST_XREvent.cpp (+7, -7) (Diff)
/intern/ghost/intern/GHOST_XRGraphicsBinding.cpp (+61, -67) (Diff)
/intern/ghost/intern/GHOST_XRSession.cpp (+28, -28) (Diff)
/intern/ghost/intern/GHOST_XrSession.h (+3, -3) (Diff)
/intern/ghost/intern/GHOST_XrSwapchain.cpp (+5, -4) (Diff)
/intern/ghost/intern/GHOST_XR.cpp (+3, -4) (Diff)
/intern/ghost/intern/GHOST_XrContext.cpp (+6, -6) (Diff)
/intern/ghost/intern/GHOST_XrContext.h (+1, -1) (Diff)
/intern/ghost/intern/GHOST_XREvent.cpp (+7, -7) (Diff)
/intern/ghost/intern/GHOST_XRGraphicsBinding.cpp (+61, -67) (Diff)
/intern/ghost/intern/GHOST_XRSession.cpp (+28, -28) (Diff)
/intern/ghost/intern/GHOST_XrSession.h (+3, -3) (Diff)
/intern/ghost/intern/GHOST_XrSwapchain.cpp (+5, -4) (Diff)