From dfef09f134370cb6fb4065432084356f2cf0c6aa Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 18 Jan 2024 11:44:38 -0800 Subject: [PATCH] cppcheck: assign d to a value Found with operatorEqVarError, missingMemberCopy Signed-off-by: Rosen Penev --- taglib/toolkit/tbytevectorlist.cpp | 2 ++ taglib/toolkit/tstringlist.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/taglib/toolkit/tbytevectorlist.cpp b/taglib/toolkit/tbytevectorlist.cpp index 8171781d..0088087f 100644 --- a/taglib/toolkit/tbytevectorlist.cpp +++ b/taglib/toolkit/tbytevectorlist.cpp @@ -70,6 +70,7 @@ ByteVectorList::~ByteVectorList() = default; ByteVectorList::ByteVectorList(const ByteVectorList &l) : List(l) { + *d = *l.d; } ByteVectorList::ByteVectorList(std::initializer_list init) : @@ -83,6 +84,7 @@ ByteVectorList &ByteVectorList::operator=(const ByteVectorList &l) return *this; List::operator=(l); + *d = *l.d; return *this; } diff --git a/taglib/toolkit/tstringlist.cpp b/taglib/toolkit/tstringlist.cpp index 224afc2c..aa6acf64 100644 --- a/taglib/toolkit/tstringlist.cpp +++ b/taglib/toolkit/tstringlist.cpp @@ -59,6 +59,7 @@ StringList::StringList() = default; StringList::StringList(const StringList &l) : List(l) { + *d = *l.d; } StringList::StringList(std::initializer_list init) : @@ -72,6 +73,7 @@ StringList &StringList::operator=(const StringList &l) return *this; List::operator=(l); + *d = *l.d; return *this; }