Message::SetUsedSize: add optional alignment argument, to avoid storing alignment with the msg object

This commit is contained in:
Alexey Rybalchenko
2023-10-18 13:01:28 +02:00
parent 1b7532a520
commit 3c714fd9e0
3 changed files with 9 additions and 5 deletions

View File

@@ -210,7 +210,7 @@ class Message final : public fair::mq::Message
// destroyed. Used size is applied only once in ApplyUsedSize, which is called by the socket
// before sending. This function just updates the desired size until the actual "resizing"
// happens.
bool SetUsedSize(size_t size) override
bool SetUsedSize(size_t size, Alignment /* alignment */ = Alignment{0}) override
{
if (size == GetSize()) {
// nothing to do