diff -r 90bf9049e5eb -r 2e6cbacafdc7 sources/network/bytestream.cpp --- a/sources/network/bytestream.cpp Wed Jan 27 19:28:18 2021 +0200 +++ b/sources/network/bytestream.cpp Wed Jan 27 19:32:55 2021 +0200 @@ -36,7 +36,7 @@ * \brief Constructs a byte cursor. The cursor is placed to the beginning of the stream. * \param data */ -Bytestream::Bytestream(ByteArray& data) : +Bytestream::Bytestream(std::vector& data) : m_data(data), m_position(0) {} @@ -66,7 +66,7 @@ /*! * \returns an iterator to the current data position. */ -ByteArray::iterator Bytestream::getCurrentIterator() +std::vector::iterator Bytestream::getCurrentIterator() { return m_data.begin() + m_position; } @@ -145,10 +145,10 @@ * \param length Amount of bytes to read. * \returns the read buffer. */ -ByteArray Bytestream::readBuffer(int length) +std::vector Bytestream::readBuffer(int length) { ensureReadSpace(length); - ByteArray result(length); + std::vector result(length); memcpy(result.data(), m_data.data() + m_position, length); m_position += length; return result;