Skip to content

Use make_shared in pricing engines#2636

Open
jewonj0620 wants to merge 1 commit into
lballabio:masterfrom
jewonj0620:feature/use-make-shared-pricingengines
Open

Use make_shared in pricing engines#2636
jewonj0620 wants to merge 1 commit into
lballabio:masterfrom
jewonj0620:feature/use-make-shared-pricingengines

Conversation

@jewonj0620

Copy link
Copy Markdown
Contributor

This PR replaces old-style ext::shared_ptr<T>(new ...) constructions with ext::make_shared<T>(...) under ql/pricingengines.

The change is intended as a mechanical modernization and follows the existing ext::make_shared usage in the codebase.

In addition, added some auto declaration when rhs and lhs return types are identical

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 74.829% (-0.01%) from 74.843% — jewonj0620:feature/use-make-shared-pricingengines into lballabio:master

@lballabio

Copy link
Copy Markdown
Owner

As we're going through this modernization, I think it's fair to use auto even when lhs and rhs are not the same. It's probably more convenient to do this now than to search for all these cases later. What do you think?

@jewonj0620

Copy link
Copy Markdown
Contributor Author

@lballabio

Okay. Sounds good to me. I will proceed to use auto instead of alias in declaration. I will apply the patch for this from this pr

Hope the review is not confused. will notify after the update!

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.

3 participants