-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Utils and libraries: Removes the boost/algorithm/string/join dependency #13726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Utils and libraries: Removes the boost/algorithm/string/join dependency #13726
Conversation
2732d07
to
c3f1970
Compare
I like Marco's idea. |
src/utilstrencodings.h
Outdated
} | ||
return stream.str(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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;
}
03a048b
to
f94ec7c
Compare
Thanks @MarcoFalke and @Empact, appreciate the feedback! I have implemented the proposed helper function in f94ec7c and updated the pull request description accordingly. |
src/validation.cpp
Outdated
@@ -2293,7 +2299,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar | |||
FormatISO8601DateTime(pindexNew->GetBlockTime()), | |||
GuessVerificationProgress(chainParams.TxData(), pindexNew), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize()); | |||
if (!warningMessages.empty()) | |||
LogPrintf(" warning='%s'", boost::algorithm::join(warningMessages, ", ")); /* Continued */ | |||
LogPrintf(" warning='%s'", warningMessages.c_str()); /* Continued */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think c_str
is needed here.
This commit removes the `boost/algorithm/string/join` dependency from the project by replacing `boost::algorithm::join` with a simple helper function.
f94ec7c
to
5f019d5
Compare
utACK 5f019d5 |
utACK 5f019d5 Thanks for helping remove our Boost dependencies! Please continue :-) |
utACK 5f019d5 |
utACK 5f019d5 |
…/join dependency 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 (comment) Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae
…/join dependency Summary: PR13726 backport https://github.com/bitcoin/bitcoin/pull/13726/files 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin/bitcoin#13726 (comment) Backporter notes: - One line missing due to prior removal of versionbits logic. Test Plan: `make check` Reviewers: jasonbcox, Fabien, schancel, #bitcoin_abc, deadalnix Reviewed By: jasonbcox, Fabien, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D3381
…/join dependency Summary: PR13726 backport https://github.com/bitcoin/bitcoin/pull/13726/files 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin/bitcoin#13726 (comment) Backporter notes: - One line missing due to prior removal of versionbits logic. Test Plan: `make check` Reviewers: jasonbcox, Fabien, schancel, #bitcoin_abc, deadalnix Reviewed By: jasonbcox, Fabien, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D3381
…/string/join dependency 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin#13726 (comment) Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae Signed-off-by: pasta <pasta@dashboost.org> # Conflicts: # contrib/devtools/lint-includes.sh # src/validation.cpp
…/string/join dependency 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin#13726 (comment) Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae Signed-off-by: pasta <pasta@dashboost.org> # Conflicts: # contrib/devtools/lint-includes.sh # src/validation.cpp
…/string/join dependency 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin#13726 (comment) Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae Signed-off-by: pasta <pasta@dashboost.org> # Conflicts: # contrib/devtools/lint-includes.sh # src/validation.cpp
…/string/join dependency 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin#13726 (comment) Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae Signed-off-by: pasta <pasta@dashboost.org> # Conflicts: # contrib/devtools/lint-includes.sh # src/validation.cpp
…/string/join dependency 5f019d5 Removes the boost/algorithm/string/join dependency (251) Pull request description: 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 bitcoin#13726 (comment) Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae Signed-off-by: pasta <pasta@dashboost.org> # Conflicts: # contrib/devtools/lint-includes.sh # src/validation.cpp
This commit removes the
boost/algorithm/string/join
dependency from the project by replacingboost::algorithm::join
with the helper function proposed by @MarcoFalke in #13726 (comment)