diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-05-14 08:52:45 +0200 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2016-05-19 07:03:19 +0000 |
commit | 6f6207fadc1a334d1aed98f840a0d074acf18d06 (patch) | |
tree | 083bf49b4d6bc999f099b3c1e2897cb23cb89887 /src/render/materialsystem/qshaderdata.h | |
parent | 72f2c87d15c76cc861699aea536e01bc8d56c8f2 (diff) |
De-inline dtors of public polymorphic classes
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info structures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.
It also allows to add code to them later, if necessary.
Change-Id: I0da301cd788162abba6cdbbb21910090a22adb9a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/materialsystem/qshaderdata.h')
-rw-r--r-- | src/render/materialsystem/qshaderdata.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/materialsystem/qshaderdata.h b/src/render/materialsystem/qshaderdata.h index 347790dde..767f4043f 100644 --- a/src/render/materialsystem/qshaderdata.h +++ b/src/render/materialsystem/qshaderdata.h @@ -53,7 +53,7 @@ class QShaderDataPrivate; class QT3DRENDERSHARED_EXPORT PropertyReaderInterface { public: - virtual ~PropertyReaderInterface() {} + virtual ~PropertyReaderInterface(); virtual QVariant readProperty(const QVariant &v) = 0; }; @@ -64,6 +64,7 @@ class QT3DRENDERSHARED_EXPORT QShaderData : public Qt3DCore::QComponent Q_OBJECT public: explicit QShaderData(Qt3DCore::QNode *parent = nullptr); + ~QShaderData(); PropertyReaderInterfacePtr propertyReader() const; |