Skip to content

Conversation

@Mrc1104
Copy link
Contributor

@Mrc1104 Mrc1104 commented Nov 15, 2025

Issue

ROOT::RNTupleModel::Create() returns a unique_ptr. We have several instances of passing the unique_ptr by reference to methods which do not assume ownership. This obscures the ownership of the RNTupleModel.

PR

This PR changes the signatures of methods from
void method(std::unique_ptr<ROOT::RNTupleModel> &ptr> to void method(ROOT::RNTupleModel *ptr>. This change does not affect the use of the RNTupleModel ptr inside the method.

Comment

The changes were made using sed to edit the nearly-identical signatures in-place
grep Analysis/ Parity/ -e "& model" -nriI | awk -F ':' '{print $1}' | xargs sed -i 's/std::unique_ptr<ROOT::RNTupleModel>& model/ROOT::RNTupleModel *model/g'

@paulmking paulmking requested a review from wdconinc December 8, 2025 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant