Seems better to use C++11 member initializers and then let the compiler figure out how to construct objects of this class.
refactor: Remove CBlockFileInfo::SetNull #28691
pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2310-LessSetNull- changing 3 files +9 −24-
maflcko commented at 11:29 AM on October 20, 2023: member
-
DrahtBot commented at 11:29 AM on October 20, 2023: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
Code Coverage
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK stickies-v, pablomartin4btc, theStack If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
- DrahtBot added the label Refactoring on Oct 20, 2023
-
in src/node/blockstorage.cpp:257 in fad1b04ddc outdated
253 | @@ -254,7 +254,7 @@ void BlockManager::PruneOneBlockFile(const int fileNumber) 254 | } 255 | } 256 | 257 | - m_blockfile_info[fileNumber].SetNull(); 258 | + m_blockfile_info[fileNumber] = CBlockFileInfo{};
stickies-v commented at 1:17 PM on October 20, 2023:nit: while touching
m_blockfile_info.at(fileNumber) = CBlockFileInfo{};in src/chain.h:64 in fad1b04ddc outdated
74 | - 75 | - CBlockFileInfo() 76 | - { 77 | - SetNull(); 78 | - } 79 | + CBlockFileInfo(){};
stickies-v commented at 1:17 PM on October 20, 2023:nit
CBlockFileInfo(){}stickies-v approvedstickies-v commented at 1:24 PM on October 20, 2023: contributorACK fad1b04ddc4e0ca03929f6d47a6510bd699e605c - nice cleanup!
DrahtBot added the label CI failed on Oct 20, 2023refactor: Remove CBlockFileInfo::SetNull fac36b94efmaflcko force-pushed on Oct 20, 2023fanquake requested review from stickies-v on Oct 20, 2023stickies-v approvedstickies-v commented at 3:23 PM on October 20, 2023: contributorACK fac36b94ef32567c0f10b605a3a441d11559e56e
pablomartin4btc approvedpablomartin4btc commented at 7:12 PM on October 20, 2023: memberACK fac36b94ef32567c0f10b605a3a441d11559e56e
theStack approvedtheStack commented at 9:18 PM on October 21, 2023: contributorLGTM ACK fac36b94ef32567c0f10b605a3a441d11559e56e
fanquake merged this on Oct 23, 2023fanquake closed this on Oct 23, 2023maflcko deleted the branch on Oct 23, 2023Frank-GER referenced this in commit df555a3657 on Nov 28, 2023bitcoin locked this on Oct 22, 2024ContributorsLabels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:13 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:13 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me