From f3ac12aa7af09efb9314ecbec36c6832cfe6ae0c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 6 Nov 1999 19:46:06 +0000 Subject: [PATCH] compile fix for VC++ 5 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dobjcmn.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/dobjcmn.cpp b/src/common/dobjcmn.cpp index 708d9e36ba..a71231b2ae 100644 --- a/src/common/dobjcmn.cpp +++ b/src/common/dobjcmn.cpp @@ -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) -- 2.47.2