boost/algorithm/string/join
dependency from the project by replacing boost::algorithm::join
with the helper function proposed by @MarcoFalke in #13726 (review)
boost/algorithm/string/join
dependency from the project by replacing boost::algorithm::join
with the helper function proposed by @MarcoFalke in #13726 (review)
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.
191+ stream << separator;
192+ }
193+ }
194+ return stream.str();
195+}
196+
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}
Thanks @MarcoFalke and @Empact, appreciate the feedback!
I have implemented the proposed helper function in f94ec7c and updated the pull request description accordingly.
This commit removes the `boost/algorithm/string/join` dependency
from the project by replacing `boost::algorithm::join` with
a simple helper function.
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 */
c_str
is needed here.
utACK 5f019d5354cb12e343ea4bb88da04fbe0e98f102
Thanks for helping remove our Boost dependencies! Please continue :-)