Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Use MakeUnique to construct objects owned by unique_ptrs #14287

Merged
merged 1 commit into from Sep 21, 2018

Conversation

Projects
None yet
4 participants
@practicalswift
Copy link
Member

commented Sep 21, 2018

A subset of #14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in #14211 (comment).

Use MakeUnique to construct objects owned by unique_ptrs.

Rationale:

  • MakeUnique ensures exception safety in complex expressions.
  • MakeUnique gives a more concise statement of the construction.
@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Sep 21, 2018

utACK b6718e3

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2018

Note to reviewers: This pull request conflicts with the following ones:
  • #14224 (Document intentional and unintentional unsigned integer overflows (wraparounds) using annotations by practicalswift)
  • #14010 (tests: Setup chain parameters (globalChainParams) when performing fuzzing initialization by practicalswift)
  • #9381 (Remove CWalletTx merging logic from AddToWallet by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@donaloconnor

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2018

utACK b6718e3

@MarcoFalke MarcoFalke merged commit b6718e3 into bitcoin:master Sep 21, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

MarcoFalke added a commit that referenced this pull request Sep 21, 2018

Merge #14287: tests: Use MakeUnique to construct objects owned by uni…
…que_ptrs

b6718e3 tests: Use MakeUnique to construct objects owned by unique_ptrs (practicalswift)

Pull request description:

  A subset of #14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in #14211 (comment).

  Use `MakeUnique` to construct objects owned by `unique_ptr`s.

  Rationale:
  * `MakeUnique` ensures exception safety in complex expressions.
  * `MakeUnique` gives a more concise statement of the construction.

Tree-SHA512: 1228ae6ce7beb178d79142c4e936b728178ccaa8aa35c6d8feeb33d1a667abfdd010c59996a9d833594611e913877ce5794e75953d11d9b1fdbac04aa491d9cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.