Skip to content

Minor tweaks based on C++ guidelines

Afonso Mukai requested to merge minor_tweaks_from_cpp_guidelines into v3.0.0

Created by: mattclarke

Issue

N/A

Description of work

Noticed a few minor things which the C++ guidelines suggest doing or not doing https://github.com/isocpp/CppCoreGuidelines

Namely:

  • use final sparingly. We have a few classes marked as final with no obvious reason for it
  • shared_ptr and unique_ptr should only be passed to functions if the function affects ownership or changes what is pointed at
  • Prefer unique_ptr over shared_ptr
  • use a managed pointer for ownership

It also lead me to some code that wasn't actually used so I removed that.

I think the final commit makes sense, but would like a second opinion

Nominate for Group Code Review

  • Nominate for code review

Merge request reports