surface: add virtual destructor to surfacerole to avoid undefined behaviour (#6620)
* surfacerole: add virtual destructor all classes that will be derived from should have a virtual destructor otherwise deleting an instance via pointer to a base class is undefined behaviour, layershell/xdgshell hits this with std::default_delete in the new sharedptr implentation. * includes: fix missing includes fix missing includes for no precompiled headers builds, and remove a redefiniton of a macro already defined in macros.hpp
This commit is contained in:
parent
4a8b13ea4f
commit
fa022901cf
5 changed files with 6 additions and 3 deletions
|
|
@ -11,4 +11,5 @@ enum eSurfaceRole {
|
|||
class ISurfaceRole {
|
||||
public:
|
||||
virtual eSurfaceRole role() = 0;
|
||||
virtual ~ISurfaceRole() = default;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue