work around Borland compilation errors
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Oct 2008 09:00:19 +0000 (09:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 20 Oct 2008 09:00:19 +0000 (09:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/event.h
src/common/event.cpp
src/xml/xml.cpp

index 3de89019111222020fcf4604a1e23c87c5133ad8..0d31e326f5e973b30e53bb05bacf612870319b06 100644 (file)
@@ -908,10 +908,13 @@ public:
     // example)
     wxKeyEvent& operator=(const wxKeyEvent& evt)
     {
-        if (&evt != this)
+        if ( &evt != this )
         {
             wxEvent::operator=(evt);
-            wxKeyboardState::operator=(evt);
+
+            // Borland C++ 5.82 doesn't compile an explicit call to an
+            // implicitly defined operator=() so need to do it this way:
+            *static_cast<wxKeyboardState *>(this) = evt;
 
             m_x = evt.m_x;
             m_y = evt.m_y;
index 7b33c11e77297f6da4e817ef382e1d7249760b2b..3299349d15892e3bab7c207724b0e2330c43e973 100644 (file)
@@ -561,7 +561,10 @@ wxMouseEvent::wxMouseEvent(wxEventType commandType)
 void wxMouseEvent::Assign(const wxMouseEvent& event)
 {
     wxEvent::operator=(event);
-    wxMouseState::operator=(event);
+
+    // Borland C++ 5.82 doesn't compile an explicit call to an implicitly
+    // defined operator=() so need to do it this way:
+    *static_cast<wxMouseState *>(this) = event;
 
     m_x = event.m_x;
     m_y = event.m_y;
index 6872113502a45b9942a0a05a22c261e984ad3738..0193e5a8591c9ae56702c1394215f6a42e9b31d7 100644 (file)
@@ -784,7 +784,7 @@ bool OutputString(wxOutputStream& stream,
 #if wxUSE_UNICODE
     wxUnusedVar(convMem);
 
-    const wxWX2MBbuf buf(str.mb_str(convFile ? *convFile : wxConvUTF8));
+    const wxWX2MBbuf buf(str.mb_str(*(convFile ? convFile : &wxConvUTF8)));
     if ( !buf )
         return false;