From d0c135e0e0ee98ee9a87d25506f9562d0d3530bf Mon Sep 17 00:00:00 2001 From: Norbert Wenzel Date: Thu, 24 Oct 2019 22:23:45 +0200 Subject: [PATCH] Mark internal class as `final` The internal `Element` class implements the pure virtual interface `IElement` which has no virtual destructor. `Element` has data members but is deleted through an `Element*` so all members are destructed correctly. To convince the compiler this is all fine and to prevent the (unlikely) case of someone inheriting from `Element` mark the class as `final`. --- wrap/openfbx/src/ofbx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrap/openfbx/src/ofbx.cpp b/wrap/openfbx/src/ofbx.cpp index a6e23236..8679bd6d 100644 --- a/wrap/openfbx/src/ofbx.cpp +++ b/wrap/openfbx/src/ofbx.cpp @@ -355,7 +355,7 @@ struct Property : IElementProperty }; -struct Element : IElement +struct Element final : IElement { IElement* getFirstChild() const override { return child; } IElement* getSibling() const override { return sibling; }