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`.
This commit is contained in:
Norbert Wenzel 2019-10-24 22:23:45 +02:00
parent 30f05d8fc9
commit d0c135e0e0
1 changed files with 1 additions and 1 deletions

View File

@ -355,7 +355,7 @@ struct Property : IElementProperty
}; };
struct Element : IElement struct Element final : IElement
{ {
IElement* getFirstChild() const override { return child; } IElement* getFirstChild() const override { return child; }
IElement* getSibling() const override { return sibling; } IElement* getSibling() const override { return sibling; }