sources/list.cpp

changeset 180
2e7225dbd9b2
parent 163
5948441a1951
child 182
20ca0a6be175
--- a/sources/list.cpp	Wed Jan 27 13:02:51 2021 +0200
+++ b/sources/list.cpp	Wed Jan 27 13:08:51 2021 +0200
@@ -76,21 +76,11 @@
 	}
 }
 
-/*!
- * \brief Constructs a byte array from an initializer list containing bytes.
- * \param initializerList List of bytes.
- */
-ByteArray::ByteArray(std::initializer_list<unsigned char> initializerList) :
-	Vector<unsigned char>(initializerList) {}
-
-/*!
- * \returns a quoted representation of the contents of the byte array.
- */
-String ByteArray::quote() const
+String quote(const ByteArray &bytes)
 {
 	String result;
 
-	for (unsigned char byte : *this)
+	for (unsigned char byte : bytes)
 		result += representByte(byte);
 
 	return "\"" + result + "\"";

mercurial