mirror of
https://github.com/taglib/taglib.git
synced 2025-07-20 05:54:20 -04:00
ByteVector::append() can't take the vector itself.
This commit is contained in:
@ -554,12 +554,16 @@ int ByteVector::endsWithPartialMatch(const ByteVector &pattern) const
|
||||
|
||||
ByteVector &ByteVector::append(const ByteVector &v)
|
||||
{
|
||||
if(v.d->length != 0) {
|
||||
detach();
|
||||
unsigned int originalSize = size();
|
||||
resize(originalSize + v.size());
|
||||
::memcpy(data() + originalSize, v.data(), v.size());
|
||||
}
|
||||
if(v.isEmpty())
|
||||
return *this;
|
||||
|
||||
detach();
|
||||
|
||||
const unsigned int originalSize = size();
|
||||
const unsigned int appendSize = v.size();
|
||||
|
||||
resize(originalSize + v.size());
|
||||
::memcpy(data() + originalSize, v.data(), appendSize);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user