1
0
Fork 0

allocate for the container to prevent taking the referance of a temporary

This commit is contained in:
Kevin Matz 2022-12-02 13:07:24 -05:00
parent db7bf1dcb3
commit 704c3a2985
1 changed files with 5 additions and 5 deletions

View File

@ -245,11 +245,11 @@ void QSacnNode::udpReceive()
return;
}
// wrap a PDU io stream around the QNetworkDatagram data buffer
auto stream = std::make_shared<ACN::PDU::pdu_stream>(
reinterpret_cast<uint8_t*>(datagram.data().data()),
datagram.data().length());
UdpPayloadReceiver(stream);
// wrap a PDU i/o stream around the QNetworkDatagram data buffer
auto data = datagram.data();
auto stream = std::make_shared<ACN::PDU::pdu_stream>(
reinterpret_cast<uint8_t*>(data.data()), data.length());
UdpPayloadReceiver(stream);
}
}