Page MenuHomePhabricator

scripted-diff: TxoutType C++11 scoped enum class
ClosedPublic

Authored by Fabien on Feb 1 2021, 16:53.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC97c446e3bf66: scripted-diff: TxoutType C++11 scoped enum class
Summary
Non-scoped enums can accidentally and silently decay into an integral
type. Also, the symbol names of the keys are exported to the surrounding
(usually global) namespace.

Fix both issues by switching to an enum class TxoutType in a (mostly)
scripted-diff.

Backport of core PR19114.

Depends on D9124.

Test Plan
ninja all check-all
ninja bitcoin-fuzzers

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Feb 1 2021, 16:53
PiRK added inline comments.
src/script/standard.h
106 ↗(On Diff #27458)

This line should probably be indented, if doygen works the way I think it works.

This revision is now accepted and ready to land.Feb 1 2021, 18:50
src/script/standard.h
106 ↗(On Diff #27458)

There was no issue with the previous version which had the same layout, so I think it's fine:
https://www.bitcoinabc.org/doc/dev/standard_8h.html#a1706cd790b4c6a3c2bb687b7826309a9