-
Notifications
You must be signed in to change notification settings - Fork 38.7k
refactor: Lift prevector default vals to the member declaration #14266
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
|
Are there any performance or other implications? |
|
Main argument for this is that it is protective against another constructor being added but neglecting to initialize these vars properly. |
|
utACK d2eee87, change looks good because members are always initialized. |
|
utACK d2eee87 nice one. nit: perhaps initialize |
|
utACK d2eee87 |
|
@sipa can you have a look at this please |
|
@MarcoFalke I expect that this will have no effect on performance (the default initializers being invoked instead of delegating to the default constructor should do the exact same thing). utACK |
|
utACK d2eee87 |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
Current version has four utACK:s -- ready for merge? :-) |
|
Five ;) |
|
utACK d2eee87 |
…laration d2eee87 Lift prevector default vals to the member declaration (Ben Woosley) Pull request description: I overlooked this possibility in #14028 ACKs for commit d2eee8: promag: utACK d2eee87, change looks good because members are always initialized. 251Labs: utACK d2eee87 nice one. ken2812221: utACK d2eee87 practicalswift: utACK d2eee87 scravy: utACK d2eee87 Tree-SHA512: f2726bae1cf892fd680cf8571027bcdc2e42ba567eaa901fb5fb5423b4d11b29e745e0163d82cb513d8c81399cc85933a16ed66d4a30829382d4721ffc41dc97
…ber declaration d2eee87 Lift prevector default vals to the member declaration (Ben Woosley) Pull request description: I overlooked this possibility in bitcoin#14028 ACKs for commit d2eee8: promag: utACK d2eee87, change looks good because members are always initialized. 251Labs: utACK d2eee87 nice one. ken2812221: utACK d2eee87 practicalswift: utACK d2eee87 scravy: utACK d2eee87 Tree-SHA512: f2726bae1cf892fd680cf8571027bcdc2e42ba567eaa901fb5fb5423b4d11b29e745e0163d82cb513d8c81399cc85933a16ed66d4a30829382d4721ffc41dc97
…zation 30e975e Lift prevector default vals to the member declaration (random-zebra) 3217b2b Name union to prevent compiler warning (random-zebra) Pull request description: Two simple additions to `prevector` class: - name the union, to prevent compiler warnings emitted by clang (from bitcoin#7146) - use non-static data member initializers for `_size` and `_union` (from bitcoin#14266) ACKs for top commit: furszy: utACK 30e975e Fuzzbawls: utACK 30e975e Tree-SHA512: f7a0dd55bbf2df0b9d0d72967ac00c476aebde936499cd3d1b5a7552aded6b7022c5a23c859eaa3599875f2c2c7bd737afdda3cd31db9d7e2c5dfdca7f0c9809
…ber declaration d2eee87 Lift prevector default vals to the member declaration (Ben Woosley) Pull request description: I overlooked this possibility in bitcoin#14028 ACKs for commit d2eee8: promag: utACK d2eee87, change looks good because members are always initialized. 251Labs: utACK d2eee87 nice one. ken2812221: utACK d2eee87 practicalswift: utACK d2eee87 scravy: utACK d2eee87 Tree-SHA512: f2726bae1cf892fd680cf8571027bcdc2e42ba567eaa901fb5fb5423b4d11b29e745e0163d82cb513d8c81399cc85933a16ed66d4a30829382d4721ffc41dc97
…ber declaration d2eee87 Lift prevector default vals to the member declaration (Ben Woosley) Pull request description: I overlooked this possibility in bitcoin#14028 ACKs for commit d2eee8: promag: utACK d2eee87, change looks good because members are always initialized. 251Labs: utACK d2eee87 nice one. ken2812221: utACK d2eee87 practicalswift: utACK d2eee87 scravy: utACK d2eee87 Tree-SHA512: f2726bae1cf892fd680cf8571027bcdc2e42ba567eaa901fb5fb5423b4d11b29e745e0163d82cb513d8c81399cc85933a16ed66d4a30829382d4721ffc41dc97
I overlooked this possibility in #14028