A C-style cast is equivalent to try casting in the following order:
- const_cast(...)
- static_cast(...)
- const_cast(static_cast(...))
- reinterpret_cast(...)
- const_cast(reinterpret_cast(...))
By using static_cast<T>(...) explicitly we avoid the possibility
of an unintentional and dangerous reinterpret_cast. Furthermore
static_cast<T>(...) allows for easier grepping of casts. Please enter the commit message for your changes. Lines starting
Backport of Core PR10498
https://github.com/bitcoin/bitcoin/pull/10498
Completes T555