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)
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-
l2a5b1 commented at 6:56 PM on July 20, 2018: contributor
- l2a5b1 force-pushed on Jul 20, 2018
-
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.
-
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:
static void AppendWarn(std::string& res, const std::string& warn){ if (!res.empty()) res+=", "; res+=warn; }l2a5b1 force-pushed on Jul 20, 2018l2a5b1 force-pushed on Jul 20, 2018l2a5b1 force-pushed on Jul 20, 2018l2a5b1 commented at 10:40 PM on July 20, 2018: contributorThanks @MarcoFalke and @Empact, appreciate the feedback!
I have implemented the proposed helper function in f94ec7c and updated the pull request description accordingly.
5f019d5354Removes 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.
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_stris needed here.l2a5b1 force-pushed on Jul 20, 2018Empact commented at 11:18 PM on July 20, 2018: memberutACK 5f019d5
fanquake added the label Refactoring on Jul 21, 2018fanquake added this to the "In progress" column in a project
practicalswift commented at 6:01 PM on July 21, 2018: contributorutACK 5f019d5354cb12e343ea4bb88da04fbe0e98f102
Thanks for helping remove our Boost dependencies! Please continue :-)
sipa commented at 9:08 PM on July 21, 2018: memberutACK 5f019d5354cb12e343ea4bb88da04fbe0e98f102
MarcoFalke commented at 2:36 AM on July 22, 2018: memberutACK 5f019d5
MarcoFalke merged this on Jul 22, 2018MarcoFalke closed this on Jul 22, 2018MarcoFalke referenced this in commit eeae4711f3 on Jul 22, 2018fanquake moved this from the "In progress" to the "Done" column in a project
jasonbcox referenced this in commit 0b45fa832c on Jun 28, 2019jtoomim referenced this in commit d26534098d on Jun 29, 2019PastaPastaPasta referenced this in commit fb76eeacdf on Jul 19, 2020PastaPastaPasta referenced this in commit e797b40593 on Jul 24, 2020PastaPastaPasta referenced this in commit fea0036e9f on Jul 27, 2020UdjinM6 referenced this in commit 046be9c919 on Jul 27, 2020UdjinM6 referenced this in commit d9ff5b0ad9 on Jul 27, 2020MarcoFalke locked this on Sep 8, 2021ContributorsLabels
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-05-07 12:15 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-05-07 12:15 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