mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-13 08:58:52 +00:00
Using std::ranges::copy from the C++ standard library has a few benefits here: * It has the additional benefit of being a bit more type safe and document the byte cast explicitly. * The compiler will likely optimize it to the same asm, but performance doesn't really matter here anyway. * It works around an UB-Sanitizer bug, when the source range is empty. Fixes https://github.com/bitcoin/bitcoin/issues/33643