sources/network/bytestream.cpp

changeset 191
2e6cbacafdc7
parent 190
90bf9049e5eb
child 195
be953e1621d9
--- 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;

mercurial