mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Fix 'get() != pointer()' assertion copying ByteVectorList/StringList (#1211)
This reverts dfef09f13
but keeps the assignments as a comment so these
functions do not look like they can be defaulted even though they cannot.
This commit is contained in:
parent
0ebb14b855
commit
c8c4e5faec
@ -70,7 +70,8 @@ ByteVectorList::~ByteVectorList() = default;
|
||||
ByteVectorList::ByteVectorList(const ByteVectorList &l) :
|
||||
List<ByteVector>(l)
|
||||
{
|
||||
*d = *l.d;
|
||||
// Uncomment if d is used, d.get() is nullptr and *d behavior undefined
|
||||
// *d = *l.d;
|
||||
}
|
||||
|
||||
ByteVectorList::ByteVectorList(std::initializer_list<ByteVector> init) :
|
||||
@ -84,7 +85,8 @@ ByteVectorList &ByteVectorList::operator=(const ByteVectorList &l)
|
||||
return *this;
|
||||
|
||||
List<ByteVector>::operator=(l);
|
||||
*d = *l.d;
|
||||
// Uncomment if d is used, d.get() is nullptr and *d behavior undefined
|
||||
// *d = *l.d;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,8 @@ StringList::StringList() = default;
|
||||
StringList::StringList(const StringList &l) :
|
||||
List<String>(l)
|
||||
{
|
||||
*d = *l.d;
|
||||
// Uncomment if d is used, d.get() is nullptr and *d behavior undefined
|
||||
// *d = *l.d;
|
||||
}
|
||||
|
||||
StringList::StringList(std::initializer_list<String> init) :
|
||||
@ -73,7 +74,8 @@ StringList &StringList::operator=(const StringList &l)
|
||||
return *this;
|
||||
|
||||
List<String>::operator=(l);
|
||||
*d = *l.d;
|
||||
// Uncomment if d is used, d.get() is nullptr and *d behavior undefined
|
||||
// *d = *l.d;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user