[moveonly] Extract MakeUnique into utilmemory.h #13690

pull Empact wants to merge 1 commits into bitcoin:master from Empact:util-memory changing 5 files +24 −10
  1. Empact commented at 5:49 pm on July 17, 2018: member

    And use it to reduce chainparamsbase.cpp’s and remove interfaces/handler.cpp’s reliance on util.h This is a step toward fixing the chainparamsbase -> util circular dependency.

    Confirmed no need for the util.h include via iwyu and visual inspection. Extracted from #13639 for easier review.

  2. practicalswift commented at 5:54 pm on July 17, 2018: contributor
    Concept ACK
  3. Empact force-pushed on Jul 17, 2018
  4. Extract MakeUnique into utilmemory.h
    And use it to reduce chainparamsbase's direct reliance on util.h to
    only args handling.
    
    utilmemory.h can be replaced with <memory> once we move to C++14.
    33539cb34b
  5. Empact force-pushed on Jul 17, 2018
  6. MarcoFalke commented at 6:04 pm on July 17, 2018: member
    utACK 33539cb34b8f59b65387c142a46744fc83d3ed31
  7. theuni commented at 6:31 pm on July 17, 2018: member
    utACK 33539cb34b8f59b65387c142a46744fc83d3ed31
  8. laanwj commented at 6:40 pm on July 17, 2018: member
    yes why not utACK 33539cb34b8f59b65387c142a46744fc83d3ed31
  9. MarcoFalke merged this on Jul 17, 2018
  10. MarcoFalke closed this on Jul 17, 2018

  11. MarcoFalke referenced this in commit c01ab133d7 on Jul 17, 2018
  12. Empact deleted the branch on Jul 17, 2018
  13. Empact commented at 7:09 pm on July 17, 2018: member

    For the record, here’s the relevant output from iwyu, as run by my fork here: https://github.com/Empact/include-what-you-use/tree/llvm-mac-os https://github.com/Empact/include-what-you-use/commit/5eba4e85e597d6906ba7f8942252ab0bd55c372f

     0(interfaces/handler.h has correct #includes/fwd-decls)
     1
     2(interfaces/handler.cpp has correct #includes/fwd-decls)
     3make[2]: *** [interfaces/libbitcoin_util_a-handler.o] Error 2
     4  CXX      libbitcoin_util_a-utilstrencodings.o
     5
     6chainparamsbase.h should remove these lines:
     7- #include <vector>  // lines 10-10
     8
     9The full include-list for chainparamsbase.h:
    10#include <memory>  // for unique_ptr
    11#include <string>  // for string
    12---
    13
    14chainparamsbase.cpp should add these lines:
    15#include <stdexcept>     // for runtime_error
    16
    17The full include-list for chainparamsbase.cpp:
    18#include <chainparamsbase.h>
    19#include <assert.h>      // for assert
    20#include <tinyformat.h>  // for strprintf
    21#include <util.h>        // for ArgsManager, gArgs, OptionsCategory, Options...
    22#include <utilmemory.h>  // for MakeUnique
    23#include <stdexcept>     // for runtime_error
    
  14. PastaPastaPasta referenced this in commit fe8ae1c2bc on Jul 19, 2020
  15. PastaPastaPasta referenced this in commit 5f32f89acc on Jul 24, 2020
  16. PastaPastaPasta referenced this in commit 07bb09cc6b on Jul 27, 2020
  17. UdjinM6 referenced this in commit 0a45392c15 on Jul 27, 2020
  18. UdjinM6 referenced this in commit 9903dcd2aa on Jul 27, 2020
  19. MarcoFalke locked this on Sep 8, 2021

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-10-04 22:12 UTC

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