Handle self-assignment (#1114)

Found with cert-oop54-cpp

Signed-off-by: Rosen Penev <[email protected]>
This commit is contained in:
Rosen Penev
2023-08-15 16:58:56 -05:00
committed by GitHub
parent f69c21c8e6
commit bbb8221301
+3
View File
@@ -183,6 +183,9 @@ StringList &PropertyMap::unsupportedData()
PropertyMap &PropertyMap::operator=(const PropertyMap &other)
{
if(this == &other)
return *this;
SimplePropertyMap::operator=(other);
*d = *other.d;
return *this;