-
Notifications
You must be signed in to change notification settings - Fork 38.1k
Use C++11 member initializer in CNodeState #21370
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
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.
cr ACK fa476f1
Safer, more readable and shorter (+18 −35): nice! :) cr ACK fa476f1 I'd be happy to review any PR migrating our classes to using C++11 default member initialization: safer is better! :) |
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.
utACK fa476f1
fa476f1 Use C++11 member initializer in CNodeState (MarcoFalke) Pull request description: This removes a bunch of boilerplate, makes the code easier to read. Also, C++11 member initialization avoids accidental uninitialized members. ACKs for top commit: practicalswift: cr ACK fa476f1 hebasto: cr ACK fa476f1 jnewbery: utACK fa476f1 Tree-SHA512: 5c876717d30ded975e29bfbc77804012179588a13f950f0b2ec93fa9dbd5cf6b52fe86414fd5d1cce021db2ec77e271d533b0f7a8d6eeaac0feb9e6dbaec9ff2
6927933 [net processing] Add ChainSyncTimeoutState default initializers (John Newbery) 55966e0 [net processing] Remove CNodeState ctor body (John Newbery) Pull request description: This addresses the two outstanding review comments from bitcoin#21370. ACKs for top commit: practicalswift: cr ACK 6927933: patch looks correct hebasto: ACK 6927933, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: b3ef5c8a096e447887df255406b3a760f01c73e2b942374595416b4b4031fc69b89cd93168c45040489d581f340b2a62d3fbabd207d4307f587c00a7a7daacd1
This removes a bunch of boilerplate, makes the code easier to read. Also, C++11 member initialization avoids accidental uninitialized members.