Skip to content

refactor: simplify FormatSubVersion using strprintf/Join - #30098

Merged
fanquake merged 1 commit into
bitcoin:masterfrom
theStack:202405-refactor-simplify-FormatSubVersion
May 15, 2024
Merged

fanquake merged 1 commit into
bitcoin:masterfrom
theStack:202405-refactor-simplify-FormatSubVersion

Conversation

@theStack

Copy link
Copy Markdown
Contributor

Rather than using std::ostringstream and manually joining the comments, use strprintf and our own Join helper.

@DrahtBot

DrahtBot commented May 13, 2024 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK TheCharlatan, hebasto, maflcko, tdb3
Concept ACK kevkevinpal

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Rather than using std::ostringstream and manually joining the
comments, use strprintf and our own `Join` helper.
@theStack
theStack force-pushed the 202405-refactor-simplify-FormatSubVersion branch from 91b9af8 to 12d8281 Compare May 13, 2024 21:32

@sedited sedited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 12d8281

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 12d8281, I have reviewed the code and it looks OK.

Comment thread src/clientversion.cpp Resolved
@maflcko

maflcko commented May 14, 2024

Copy link
Copy Markdown
Member

utACK 12d8281

@tdb3 tdb3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK for 12d8281.

Thank you. Making code more concise and readable is much appreciated.
Built and ran unit tests (including util_tests/test_FormatSubVersion) and functionals. All passed.

A one/same-line if aligns with the coding style (https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-c).

If an if only has a single-statement then-clause, it can appear on the same line as the if, without braces.

@kevkevinpal

Copy link
Copy Markdown
Contributor

utACK #30084.

@fanquake
fanquake merged commit 3d24189 into bitcoin:master May 15, 2024
@theStack
theStack deleted the 202405-refactor-simplify-FormatSubVersion branch May 15, 2024 06:49
@bitcoin bitcoin locked and limited conversation to collaborators May 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants