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:
parent
30f05d8fc9
commit
d0c135e0e0
|
@ -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; }
|
||||
|
|
Loading…
Reference in New Issue