diff options
author | Julian Eisel <julian@blender.org> | 2020-08-14 13:37:53 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-14 13:37:53 +0300 |
commit | 2d653364086d62cc9b503724c962cc466ad3e4b4 (patch) | |
tree | 89cc65403b96ab3bd330719856ca6330dadaf99f /source/blender/blenlib/BLI_array.hh | |
parent | 1ff1b7fcea10fe2e2bdab1e9c881da62199c5150 (diff) |
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.
Diffstat (limited to 'source/blender/blenlib/BLI_array.hh')
0 files changed, 0 insertions, 0 deletions