Utils and libraries: Removes the boost/algorithm/string/join dependency #13726

pull l2a5b1 wants to merge 1 commits into bitcoin:master from l2a5b1:patch/remove_boost_join_dependency changing 2 files +11 −6
  1. l2a5b1 commented at 6:56 pm on July 20, 2018: contributor
    This commit removes the boost/algorithm/string/join dependency from the project by replacing boost::algorithm::join with the helper function proposed by @MarcoFalke in #13726 (review)
  2. l2a5b1 force-pushed on Jul 20, 2018
  3. Empact commented at 8:07 pm on July 20, 2018: member

    ~Given it’s only used in the one place, I’d be inclined to make it static to the file used, or making a more narrow util file for it.~

    I like Marco’s idea.

  4. in src/utilstrencodings.h:196 in c3f1970cb5 outdated
    191+            stream << separator;
    192+        }
    193+    }
    194+    return stream.str();
    195+}
    196+
    


    MarcoFalke commented at 8:23 pm on July 20, 2018:

    Instead of a whole util function you might just inline a helper to append the warning:

    0static void AppendWarn(std::string& res, const std::string& warn){
    1if (!res.empty()) res+=", ";
    2res+=warn;
    3}
    
  5. l2a5b1 force-pushed on Jul 20, 2018
  6. l2a5b1 force-pushed on Jul 20, 2018
  7. l2a5b1 force-pushed on Jul 20, 2018
  8. l2a5b1 commented at 10:40 pm on July 20, 2018: contributor

    Thanks @MarcoFalke and @Empact, appreciate the feedback!

    I have implemented the proposed helper function in f94ec7c and updated the pull request description accordingly.

  9. Removes the boost/algorithm/string/join dependency
    This commit removes the `boost/algorithm/string/join` dependency
    from the project by replacing `boost::algorithm::join` with
    a simple helper function.
    5f019d5354
  10. in src/validation.cpp:2302 in f94ec7c5f3 outdated
    2298@@ -2293,7 +2299,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
    2299       FormatISO8601DateTime(pindexNew->GetBlockTime()),
    2300       GuessVerificationProgress(chainParams.TxData(), pindexNew), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize());
    2301     if (!warningMessages.empty())
    2302-        LogPrintf(" warning='%s'", boost::algorithm::join(warningMessages, ", ")); /* Continued */
    2303+        LogPrintf(" warning='%s'", warningMessages.c_str()); /* Continued */
    


    Empact commented at 10:47 pm on July 20, 2018:
    I don’t think c_str is needed here.
  11. l2a5b1 force-pushed on Jul 20, 2018
  12. Empact commented at 11:18 pm on July 20, 2018: member
    utACK 5f019d5
  13. l2a5b1 commented at 11:22 pm on July 20, 2018: contributor
    Thanks @Empact, yeah your right. I didn’t expect that one 👍 Addressed in 5f019d5.
  14. fanquake added the label Refactoring on Jul 21, 2018
  15. fanquake added this to the "In progress" column in a project

  16. practicalswift commented at 6:01 pm on July 21, 2018: contributor

    utACK 5f019d5354cb12e343ea4bb88da04fbe0e98f102

    Thanks for helping remove our Boost dependencies! Please continue :-)

  17. sipa commented at 9:08 pm on July 21, 2018: member
    utACK 5f019d5354cb12e343ea4bb88da04fbe0e98f102
  18. MarcoFalke commented at 2:36 am on July 22, 2018: member
    utACK 5f019d5
  19. MarcoFalke merged this on Jul 22, 2018
  20. MarcoFalke closed this on Jul 22, 2018

  21. MarcoFalke referenced this in commit eeae4711f3 on Jul 22, 2018
  22. fanquake moved this from the "In progress" to the "Done" column in a project

  23. jasonbcox referenced this in commit 0b45fa832c on Jun 28, 2019
  24. jtoomim referenced this in commit d26534098d on Jun 29, 2019
  25. PastaPastaPasta referenced this in commit fb76eeacdf on Jul 19, 2020
  26. PastaPastaPasta referenced this in commit e797b40593 on Jul 24, 2020
  27. PastaPastaPasta referenced this in commit fea0036e9f on Jul 27, 2020
  28. UdjinM6 referenced this in commit 046be9c919 on Jul 27, 2020
  29. UdjinM6 referenced this in commit d9ff5b0ad9 on Jul 27, 2020
  30. 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-11-17 18:12 UTC

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