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

@practicalswift
Copy link
Contributor

@practicalswift practicalswift 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
Copy link
Member

@MarcoFalke MarcoFalke commented Sep 21, 2018

utACK b6718e3

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot 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
Copy link
Contributor

@donaloconnor donaloconnor commented Sep 21, 2018

utACK b6718e3

@MarcoFalke MarcoFalke merged commit b6718e3 into bitcoin:master Sep 21, 2018
2 checks passed
MarcoFalke added a commit that referenced this issue Sep 21, 2018
…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
@practicalswift practicalswift deleted the make_unique-subset branch Apr 10, 2021
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 24, 2021
… by unique_ptrs

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

Pull request description:

  A subset of bitcoin#14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in bitcoin#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

# Conflicts:
#	src/test/test_dash.cpp
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 24, 2021
… by unique_ptrs

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

Pull request description:

  A subset of bitcoin#14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in bitcoin#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

# Conflicts:
#	src/test/test_dash.cpp
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 28, 2021
… by unique_ptrs

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

Pull request description:

  A subset of bitcoin#14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in bitcoin#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
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 29, 2021
… by unique_ptrs

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

Pull request description:

  A subset of bitcoin#14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in bitcoin#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
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 29, 2021
… by unique_ptrs

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

Pull request description:

  A subset of bitcoin#14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in bitcoin#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
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 29, 2021
… by unique_ptrs

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

Pull request description:

  A subset of bitcoin#14211 ("Use MakeUnique to construct objects owned by unique_ptrs") as suggested by @MarcoFalke in bitcoin#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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants