Pull Request №725 RosettaCommons/rosetta/main ← lyskov-ai/rosetta/refactor/protocols-rule-of-zero-redundant-dtors
Merge: 9567e54bafdaf4697b28b6f4d41a07596e50ed5c←d674c6a338a087e57a3e277f0dced0cf781119a4
Apply Rule of Zero to protocols/ classes with redundant destructors
----------------
Merge commit message:
Apply Rule of Zero to protocols/ classes with redundant destructors
Removes user-declared destructors that are equivalent to the implicitly
generated one (either '= default' or an empty '{}' body), letting the
compiler generate them. In every case the class holds only non-owning
raw pointers (back-references it does not allocate or free), so no
destructor logic is lost and ownership semantics are unchanged.
Classes:
- antibody/clusters/CDRClusterSet
- hbnet/NetworkState
- jobdist/AtomTreeDiffJobDistributor
- nmr/pcs/AtomGridPoint
- noesy_assign/FloatingResonance
- noesy_assign/PeakAssignment
- peptide_deriver/PeptideDeriverBasicStreamOutputter (also drops its
user-declared copy constructor, which did a plain memberwise copy
identical to the implicit one)
For classes deriving from a base with a virtual destructor, the implicit
destructor is virtual and inherited, so polymorphic destruction is
unchanged. A few now-moot 'auto-generated destructor' doc comments were
removed alongside their declarations.
Other rule_of_zero scan hits in protocols/ were intentionally left out:
they own their pointers (freed in the destructor), are singletons/
factories that legitimately prevent copying, are observers whose
destructors detach from a subject, or have intentionally partial copy
constructors.