The only external call to SetNull is changed as follow
- m_coin_control->SetNull();
+ m_coin_control = std::make_unique<CCoinControl>();
The only external call to SetNull is changed as follow
- m_coin_control->SetNull();
+ m_coin_control = std::make_unique<CCoinControl>();
Concept ACK: default member initialisation is simply better. Thanks for cleaning this up.
The only external call to
SetNullis changed as follow- m_coin_control->SetNull(); + m_coin_control.reset(new CCoinControl);
Could be made more idiomatic as m_coin_control = std::make_unique<CCoinControl>()?
Rationale:
5 | @@ -6,21 +6,8 @@ 6 | 7 | #include <util/system.h> 8 | 9 | -void CCoinControl::SetNull() 10 | +CCoinControl::CCoinControl() 11 | { 12 | destChange = CNoDestination();
descChange could be default initialized like the other member variables?
43 | @@ -44,20 +44,15 @@ class CCoinControl
44 | //! Avoid partial use of funds sent to a given address
45 | bool m_avoid_partial_spends;
Could be default initialised to DEFAULT_AVOIDPARTIALSPENDS?
or made const, which also avoids uninitialized reads
It's changed in wallet.cpp.
Initialised to DEFAULT_AVOIDPARTIALSPENDS.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
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.
Concept ACK
Some suggestions:
m_coin_control twice, but rather set it to the suggested form m_coin_control = std::make_unique<CCoinControl>(); in the first commit already@theStack thanks, fixed 1st commit and moved the 2nd to https://github.com/bitcoin-core/gui/pull/284.
Code-Review ACK c5a470eee1ac864b7c02b6a1669327b68411d806
review ACK c5a470eee1ac864b7c02b6a1669327b68411d806 🍤
<details><summary>Show signature and timestamp</summary>
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
review ACK c5a470eee1ac864b7c02b6a1669327b68411d806 🍤
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjEBQv9Hyhwk4wiG0CE/cprRuXgoATy0MDrJI2ii4SfyRpkyQUWUUwJDqJ32u7g
90CiAI8F9/YOraKKlQ/0C8UvpoSldXQoPO8R9BPMZ0bN071w4P0veGQJC6HSodYb
tWUMaHRY4CfcNLwQs+9a67k2jMARYazkpthSpJDd9bHjncAnjOxS1mlPprVucRFt
hyK3nvHafk7i+RE9qvikAd4N6bBccDQ113qB6sdrMuc8a1cy7zyebnc8UnsR1ycU
qMmr3Uw6JrUeSgPy45XjA8Qg/0FgyTl9XzqyuLkfritbba44ruiAliKNkKaN8/zJ
r43TkSAh+qWT27KirL2hUvC5SHutL2W5qe0PD6L/ELo+jsTC6feTvxDkquq28/8D
eAteFrKnXSbztnvKzCRGQgWRjD5NcXNNrL9cDpy773u6ry6x0hW/NcLWyhasKF3x
QarYEFR0YgmYvJeOzRJk6ZulylZz9cLhIFzZznkhPTfnw3Fk2P3px505TZXSzEaM
KqFm03/a
=WFww
-----END PGP SIGNATURE-----
Timestamp of file with hash 226895addc7c0ac26f721c2093209f0d6c180e2ba9db87fb2e6db52dc99831da -
</details>