--- 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<unsigned char>& 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<unsigned char>::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<unsigned char> Bytestream::readBuffer(int length) { ensureReadSpace(length); - ByteArray result(length); + std::vector<unsigned char> result(length); memcpy(result.data(), m_data.data() + m_position, length); m_position += length; return result;