]> git.saurik.com Git - wxWidgets.git/commitdiff
compile fix for VC++ 5
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 6 Nov 1999 19:46:06 +0000 (19:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 6 Nov 1999 19:46:06 +0000 (19:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dobjcmn.cpp

index 708d9e36ba9a35044d7513aabb6549daf46864f5..a71231b2ae85d96d514c2a3810b8c4eee4e38b84 100644 (file)
@@ -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)