-
Notifications
You must be signed in to change notification settings - Fork 38.1k
[refactor] CNode: Use C++11 default member initializers #15144
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Concept ACK. Will review. |
std::atomic<int64_t> nPingUsecTime{0}; | ||
// Best measured round-trip time. | ||
std::atomic<int64_t> nMinPingUsecTime; | ||
std::atomic<int64_t> nMinPingUsecTime{std::numeric_limits<int64_t>::max()}; |
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.
#include <limits>
ACK fac2f5e:
|
utACK fac2f5e |
nTimeOffset = 0; | ||
addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn; | ||
nVersion = 0; | ||
strSubVer = ""; |
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.
Remove this redundant line? :-)
utACK fac2f5e |
utACK fac2f5e |
fac2f5e Use C++11 default member initializers (MarcoFalke) Pull request description: The second and last change on this topic (c.f. #15109). Split up because the diff would otherwise interleave, making review harder than necessary. This is not a stylistic change, but a change that avoids bugs such as: * fix uninitialized read when stringifying an addrLocal #14728 * qt: Initialize members in WalletModel #12426 * net: correctly initialize nMinPingUsecTime #6636 * ... Tree-SHA512: 547ae72b87aeaed5890eb5fdcff612bfc93354632b238d89e1e1c0487187f39609bcdc537ef21345e0aea8cfcf1ea48da432d672c5386dd87cf58742446a86b1
Backporting Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers Resolved Merge conflicts after cherry-picking the backport commit hash
…1 default member initializers
…Use C++11 default member initializers" This reverts commit b8a07d9.
…ber initializers
…alizers (#4371) * Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers * Backport Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers * Merge bitcoin#15144: [refactor] CNode: Use C++11 default member initializers #4371 Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
The second and last change on this topic (c.f. #15109). Split up because the diff would otherwise interleave, making review harder than necessary.
This is not a stylistic change, but a change that avoids bugs such as: