cppcheck: assign d to a value

Found with operatorEqVarError, missingMemberCopy

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-01-18 11:44:38 -08:00 committed by Urs Fleisch
parent 3a003c1229
commit dfef09f134
2 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,7 @@ ByteVectorList::~ByteVectorList() = default;
ByteVectorList::ByteVectorList(const ByteVectorList &l) :
List<ByteVector>(l)
{
*d = *l.d;
}
ByteVectorList::ByteVectorList(std::initializer_list<ByteVector> init) :
@ -83,6 +84,7 @@ ByteVectorList &ByteVectorList::operator=(const ByteVectorList &l)
return *this;
List<ByteVector>::operator=(l);
*d = *l.d;
return *this;
}

View File

@ -59,6 +59,7 @@ StringList::StringList() = default;
StringList::StringList(const StringList &l) :
List<String>(l)
{
*d = *l.d;
}
StringList::StringList(std::initializer_list<String> init) :
@ -72,6 +73,7 @@ StringList &StringList::operator=(const StringList &l)
return *this;
List<String>::operator=(l);
*d = *l.d;
return *this;
}