sources/network/bytestream.cpp

changeset 158
de7574d292ad
parent 157
42bb29924218
child 167
0150f86e68f0
--- a/sources/network/bytestream.cpp	Fri Jul 22 17:50:00 2016 +0300
+++ b/sources/network/bytestream.cpp	Fri Jul 22 17:52:23 2016 +0300
@@ -36,7 +36,7 @@
  * \brief Constructs a byte cursor. The cursor is placed to the beginning of the stream.
  * \param data
  */
-Bytestream::Bytestream(Vector<unsigned char>& data) :
+Bytestream::Bytestream(ByteArray& data) :
     m_data(data),
     m_position(0) {}
 
@@ -66,7 +66,7 @@
 /*!
  * \returns an iterator to the current data position.
  */
-Vector<unsigned char>::Iterator Bytestream::getCurrentIterator()
+ByteArray::Iterator Bytestream::getCurrentIterator()
 {
 	return m_data.begin() + m_position;
 }
@@ -129,7 +129,7 @@
  */
 String Bytestream::readString()
 {
-	Vector<unsigned char>::Iterator stringEndIterator;
+	ByteArray::Iterator stringEndIterator;
 
 	// Where's the end of the string?
 	for (stringEndIterator = getCurrentIterator(); *stringEndIterator != '\0'; ++stringEndIterator)
@@ -158,10 +158,10 @@
  * \param length Amount of bytes to read.
  * \returns the read buffer.
  */
-Vector<unsigned char> Bytestream::readBuffer(int length)
+ByteArray Bytestream::readBuffer(int length)
 {
 	ensureReadSpace(length);
-	Vector<unsigned char> result(length);
+	ByteArray result(length);
 	memcpy(result.data(), m_data.data() + m_position, length);
 	m_position += length;
 	return result;

mercurial