Make CreateDataObject() return wxDataObjectComposite

This function must return a composite data object and not just any
wxDataObject because its callers cast the returned object to this class,
so make it a bit more type-safe.
This commit is contained in:
Vadim Zeitlin
2021-12-10 20:06:30 +01:00
parent 352923dc8d
commit 31bdfd6523
3 changed files with 16 additions and 6 deletions

View File

@@ -809,7 +809,8 @@ protected:
// Helper function which can be used by DoEnableDropTarget() implementations
// in the derived classes: return a composite data object supporting the
// given formats or null if the vector is empty.
static wxDataObject* CreateDataObject(const wxVector<wxDataFormat>& formats);
static wxDataObjectComposite*
CreateDataObject(const wxVector<wxDataFormat>& formats);
virtual bool DoEnableDropTarget(const wxVector<wxDataFormat>& WXUNUSED(formats))
{ return false; }