pre allocate memory for the message data
This commit is contained in:
parent
dafa95ec76
commit
db3da280da
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue