X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8fb3a512a85572ebf4b4f46eaf536727dfe4e01e..5e84fc5a820a15a1ce2d32d2ae71f0bf92abda3d:/src/common/dobjcmn.cpp diff --git a/src/common/dobjcmn.cpp b/src/common/dobjcmn.cpp index 53a4041c7b..a71231b2ae 100644 --- a/src/common/dobjcmn.cpp +++ b/src/common/dobjcmn.cpp @@ -232,9 +232,9 @@ void wxFileDataObjectBase::SetFilenames(const wxChar* filenames) wxCustomDataObject::wxCustomDataObject(const wxDataFormat& format) : wxDataObjectSimple(format) { + m_data = (void *)NULL; } - wxCustomDataObject::~wxCustomDataObject() { Free(); @@ -301,9 +301,13 @@ bool wxCustomDataObject::SetData(size_t size, const void *buf) // wxTextDropTarget // ---------------------------------------------------------------------------- +// NB: we can't use "new" in ctor initializer lists because this provokes an +// internal compiler error with VC++ 5.0 (hey, even gcc compiles this!), +// so use SetDataObject() instead + wxTextDropTarget::wxTextDropTarget() - : wxDropTarget(new wxTextDataObject) { + SetDataObject(new wxTextDataObject); } wxDragResult wxTextDropTarget::OnData(wxCoord x, wxCoord y, wxDragResult def) @@ -320,8 +324,8 @@ wxDragResult wxTextDropTarget::OnData(wxCoord x, wxCoord y, wxDragResult def) // ---------------------------------------------------------------------------- wxFileDropTarget::wxFileDropTarget() - : wxDropTarget(new wxFileDataObject) { + SetDataObject(new wxFileDataObject); } wxDragResult wxFileDropTarget::OnData(wxCoord x, wxCoord y, wxDragResult def)