Skip to content

Commit

Permalink
COMP: Fix -Wdelete-non-virtual-dtor in ctkDICOMDisplayedFieldGenerato…
Browse files Browse the repository at this point in the history
…rAbstractRule

This commit fixes the following warning:

  /path/to/Slicer-SuperBuild/CTK/Libs/DICOM/Core/ctkDICOMDisplayedFieldGenerator.cpp: In destructor ‘virtual ctkDICOMDisplayedFieldGeneratorPrivate::~ctkDICOMDisplayedFieldGeneratorPrivate()’:
  /path/to/Slicer-SuperBuild/CTK/Libs/DICOM/Core/ctkDICOMDisplayedFieldGenerator.cpp:62:12: warning: deleting object of abstract class type ‘ctkDICOMDisplayedFieldGeneratorAbstractRule’ which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
       delete rule;
              ^
  • Loading branch information
jcfr committed Apr 15, 2019
1 parent 521bb09 commit fa757e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Libs/DICOM/Core/ctkDICOMDisplayedFieldGeneratorAbstractRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class ctkDICOMDatabase;
class CTK_DICOM_CORE_EXPORT ctkDICOMDisplayedFieldGeneratorAbstractRule
{
public:
virtual ~ctkDICOMDisplayedFieldGeneratorAbstractRule(){}

/// Generate displayed fields for a certain instance based on its cached tags
/// Each rule plugin has the chance to fill any field in the series, study, and patient fields.
/// The way these generated fields will be used is defined by \sa mergeDisplayedFieldsForInstance
Expand Down

0 comments on commit fa757e1

Please sign in to comment.