phate / jlm

GNU Lesser General Public License v2.1
44 stars 14 forks source link

Add overloads to shared_ptr of type for various ops #505

Closed caleridas closed 3 weeks ago

caleridas commented 3 weeks ago

Add overloaded constructors and/or creator functions that take "shared_ptr" instead of "const type &" arguments (and hence can take over reference from caller, instead of requiring a copy operation).

In some cases, the "type copy" methods can be removed as they have no callers anymore. For others, the superseded methods will be removed once all callers are converted.

This sets the groundwork for gradually converting all call sites to use shared type references.

caleridas commented 3 weeks ago

This adds several overloads to existing methods, with the intent of later superseding the methods that rely on "type copy". It is too cumbersome to do all conversions in a single pass, so I think I need to go through this intermediate step.