Page MenuHomePhabricator

Use C++11 member initializer in CTxMemPoolEntry
ClosedPublic

Authored by PiRK on Oct 6 2022, 13:06.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC9731bc95ab78: Use C++11 member initializer in CTxMemPoolEntry
Summary

This removes a bunch of boilerplate, makes the code easier to read.
Also, C++11 member initialization avoids accidental uninitialized
members.

Can be reviewed with the git option "--word-diff-regex=." or with "git
difftool --tool=meld".

This is a backport of core#23054

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Oct 6 2022, 13:06
Fabien added inline comments.
src/txmempool.cpp
33

I don't understand why using this initializer prevents Wshadow. Any idea ?

rename parameter ts -> _tx to make sure we do not trigger a Wshadow on any compiler.

This revision is now accepted and ready to land.Oct 7 2022, 09:37