MetaEngine::save() is re-implemented in DMetadata without to use virtual property.
Gilles Caulier
caulier.gilles at gmail.com
Fri Nov 13 15:10:00 GMT 2020
Hi, all,
I currently review all Clazy static analyzer reports, and i plan to
merge DMetadata class to MetaEngine.
While reviewing the code I discovered that MetadaEngine::save() is
implemented into DMetadata without being declared as virtual.
I'm surprised to not see a G++ warning about this code, which can
introduce side effects... Look by yourself :
https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/engine/metaengine.h#L372
https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/metadataengine/dmetadata/dmetadata.h#L95
How is it technically possible ?
Best
Gilles Caulier
More information about the Digikam-devel
mailing list