refactor: Remove CBlockFileInfo::SetNull #28691

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2310-LessSetNull- changing 3 files +9 −24
  1. maflcko commented at 11:29 am on October 20, 2023: member
    Seems better to use C++11 member initializers and then let the compiler figure out how to construct objects of this class.
  2. DrahtBot commented at 11:29 am on October 20, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    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.

  3. DrahtBot added the label Refactoring on Oct 20, 2023
  4. 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

    0    m_blockfile_info.at(fileNumber) = CBlockFileInfo{};
    
  5. 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

    0    CBlockFileInfo(){}
    
  6. stickies-v approved
  7. stickies-v commented at 1:24 pm on October 20, 2023: contributor
    ACK fad1b04ddc4e0ca03929f6d47a6510bd699e605c - nice cleanup!
  8. DrahtBot added the label CI failed on Oct 20, 2023
  9. refactor: Remove CBlockFileInfo::SetNull fac36b94ef
  10. maflcko force-pushed on Oct 20, 2023
  11. fanquake requested review from stickies-v on Oct 20, 2023
  12. stickies-v approved
  13. stickies-v commented at 3:23 pm on October 20, 2023: contributor
    ACK fac36b94ef32567c0f10b605a3a441d11559e56e
  14. pablomartin4btc approved
  15. pablomartin4btc commented at 7:12 pm on October 20, 2023: member
    ACK fac36b94ef32567c0f10b605a3a441d11559e56e
  16. theStack approved
  17. theStack commented at 9:18 pm on October 21, 2023: contributor
    LGTM ACK fac36b94ef32567c0f10b605a3a441d11559e56e
  18. fanquake merged this on Oct 23, 2023
  19. fanquake closed this on Oct 23, 2023

  20. maflcko deleted the branch on Oct 23, 2023

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: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me