sources/list.cpp

branch
protocol5
changeset 195
be953e1621d9
parent 191
2e6cbacafdc7
--- a/sources/list.cpp	Wed Jan 27 12:41:50 2021 +0200
+++ b/sources/list.cpp	Wed Jan 27 19:48:41 2021 +0200
@@ -1,5 +1,5 @@
 /*
-	Copyright 2016 Teemu Piippo
+	Copyright 2016 - 2021 Teemu Piippo
 	All rights reserved.
 
 	Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,6 @@
 */
 
 #include "list.h"
-#include "mystring.h"
 
 BEGIN_ZFC_NAMESPACE
 
@@ -76,21 +75,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) {}
+std::string quote(const std::vector<unsigned char> &bytes)
+{
+	std::string result;
 
-/*!
- * \returns a quoted representation of the contents of the byte array.
- */
-String ByteArray::quote() const
-{
-	String result;
-
-	for (unsigned char byte : *this)
+	for (unsigned char byte : bytes)
 		result += representByte(byte);
 
 	return "\"" + result + "\"";

mercurial