diff --git a/daemon/face/datagram-transport.hpp b/daemon/face/datagram-transport.hpp index 0dcf0e1f..923dde33 100644 --- a/daemon/face/datagram-transport.hpp +++ b/daemon/face/datagram-transport.hpp @@ -202,7 +202,7 @@ template void DatagramTransport::handleReceive(const boost::system::error_code& error, size_t nBytesReceived) { - receiveDatagram(ndn::span(m_receiveBuffer).first(nBytesReceived), error); + receiveDatagram(ndn::make_span(m_receiveBuffer).first(nBytesReceived), error); if (m_socket.is_open()) m_socket.async_receive_from(boost::asio::buffer(m_receiveBuffer), m_sender, diff --git a/daemon/face/stream-transport.hpp b/daemon/face/stream-transport.hpp index 750432f1..acc92e0b 100644 --- a/daemon/face/stream-transport.hpp +++ b/daemon/face/stream-transport.hpp @@ -247,7 +247,7 @@ StreamTransport::handleReceive(const boost::system::error_code& error, NFD_LOG_FACE_TRACE("Received: " << nBytesReceived << " bytes"); m_receiveBufferSize += nBytesReceived; - auto unparsedBytes = ndn::span(m_receiveBuffer).first(m_receiveBufferSize); + auto unparsedBytes = ndn::make_span(m_receiveBuffer).first(m_receiveBufferSize); while (!unparsedBytes.empty()) { auto [isOk, element] = Block::fromBuffer(unparsedBytes); if (!isOk)