1300 | @@ -1301,7 +1301,7 @@ class V2TransportTester
1301 | {
1302 | // Construct contents consisting of 0x00 + 12-byte message type + payload.
1303 | std::vector<uint8_t> contents(1 + CMessageHeader::MESSAGE_TYPE_SIZE + payload.size());
1304 | - std::copy(mtype.begin(), mtype.end(), reinterpret_cast<char*>(contents.data() + 1));
1305 | + std::copy(mtype.begin(), mtype.end(), contents.begin() + 1);
1306 | std::copy(payload.begin(), payload.end(), contents.begin() + 1 + CMessageHeader::MESSAGE_TYPE_SIZE);
To clarify that the second one doesn't actually copy where the first left off:
std::ranges::copy(mtype, contents.begin() + 1);
std::ranges::copy(payload, contents.begin() + 1 + CMessageHeader::MESSAGE_TYPE_SIZE);
The goal is to just change the line, so that it matches all other test cases in this file. Happy to review a follow-up to apply the clang-tidy use-ranges to the src/test directory (or all files). But I want to keep this one minimal for now.