Merge pull request #138 from TsudaKageyu/refector-bytevector

Small refactoring of tbytevector.cpp
This commit is contained in:
Tsuda Kageyu 2013-04-16 05:34:59 -07:00
commit 39fef2705c

View File

@ -248,6 +248,12 @@ public:
{
}
// A char* can be an iterator.
DataPrivate(const char *begin, const char *end)
: data(begin, end)
{
}
DataPrivate(uint len, char c)
: data(len, c)
{
@ -294,12 +300,10 @@ public:
ByteVectorPrivate(const char *s, uint l)
: RefCounter()
, data(new DataPrivate())
, data(new DataPrivate(s, s + l))
, offset(0)
, length(l)
{
data->data.resize(length);
memcpy(DATA(this), s, l);
}
void detach()