1
0
Fork 0

pre allocate memory for the message data

This commit is contained in:
Kevin Matz 2023-04-26 10:01:33 -04:00
parent dafa95ec76
commit db3da280da
1 changed files with 1 additions and 0 deletions

View File

@ -202,6 +202,7 @@ void Message::write(std::vector<uint8_t> &data) const
writeDiscBranch(data);
return;
}
data.reserve(26 + length());
data.push_back(SC_RDM);
data.push_back(SC_SUB_MESSAGE);
data.push_back(24 + length());