Use only Span{} constructor for byte-like types where possible

This removes bloat that is not needed.
This commit is contained in:
MarcoFalke
2023-06-22 17:02:28 +02:00
parent fa257bc831
commit fa38d86235
10 changed files with 23 additions and 23 deletions

View File

@@ -2939,13 +2939,13 @@ void CaptureMessageToFile(const CAddress& addr,
AutoFile f{fsbridge::fopen(path, "ab")};
ser_writedata64(f, now.count());
f.write(MakeByteSpan(msg_type));
f << Span{msg_type};
for (auto i = msg_type.length(); i < CMessageHeader::COMMAND_SIZE; ++i) {
f << uint8_t{'\0'};
}
uint32_t size = data.size();
ser_writedata32(f, size);
f.write(AsBytes(data));
f << data;
}
std::function<void(const CAddress& addr,