Skip to content

Conversation

@Empact
Copy link
Contributor

@Empact Empact commented Sep 19, 2018

I overlooked this possibility in #14028

@maflcko
Copy link
Member

maflcko commented Sep 19, 2018

Are there any performance or other implications?

@Empact
Copy link
Contributor Author

Empact commented Sep 19, 2018

Main argument for this is that it is protective against another constructor being added but neglecting to initialize these vars properly.

@promag
Copy link
Contributor

promag commented Sep 19, 2018

utACK d2eee87, change looks good because members are always initialized.

@l2a5b1
Copy link
Contributor

l2a5b1 commented Sep 22, 2018

utACK d2eee87 nice one.

nit: perhaps initialize _union and _size with an empty initializer list {}:
_size {}; _union {};.

@ken2812221
Copy link
Contributor

utACK d2eee87

@laanwj
Copy link
Member

laanwj commented Dec 13, 2018

@sipa can you have a look at this please

@bitcoin bitcoin deleted a comment from DrahtBot Dec 13, 2018
@sipa
Copy link
Member

sipa commented Dec 13, 2018

@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

@practicalswift
Copy link
Contributor

utACK d2eee87

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 12, 2019

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

Conflicts

No conflicts as of last run.

@practicalswift
Copy link
Contributor

Current version has four utACK:s -- ready for merge? :-)

@Empact
Copy link
Contributor Author

Empact commented Apr 30, 2019

Five ;)

@scravy
Copy link
Contributor

scravy commented Apr 30, 2019

utACK d2eee87

@maflcko maflcko changed the title Lift prevector default vals to the member declaration refactor: Lift prevector default vals to the member declaration Apr 30, 2019
@maflcko maflcko added this to the 0.19.0 milestone Apr 30, 2019
@maflcko maflcko merged commit d2eee87 into bitcoin:master May 6, 2019
maflcko pushed a commit that referenced this pull request May 6, 2019
…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
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 7, 2019
…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
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request May 22, 2020
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 10, 2021
…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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.