From fd4afea729f635b4cd219b5b82899b50161efe6f Mon Sep 17 00:00:00 2001 From: David Webster Date: Mon, 22 May 2000 14:03:03 +0000 Subject: [PATCH] removal of VA #ifdefs aournd delete operators git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datetime.cpp | 2 -- src/common/image.cpp | 26 ++++++++++++-------------- src/common/list.cpp | 4 ---- src/common/object.cpp | 3 --- src/common/wincmn.cpp | 5 ----- 5 files changed, 12 insertions(+), 28 deletions(-) diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index fe9d36485e..4fd3783363 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -3553,9 +3553,7 @@ wxDateTimeHolidayAuthority::GetHolidaysInRange(const wxDateTime& dtStart, /* static */ void wxDateTimeHolidayAuthority::ClearAllAuthorities() { -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) WX_CLEAR_ARRAY(ms_authorities); -#endif } /* static */ diff --git a/src/common/image.cpp b/src/common/image.cpp index e0380e6855..666a09736a 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -181,20 +181,20 @@ void wxImage::Destroy() wxImage wxImage::Copy() const { wxImage image; - + wxCHECK_MSG( Ok(), image, wxT("invalid image") ); image.Create( M_IMGDATA->m_width, M_IMGDATA->m_height ); - + char unsigned *data = image.GetData(); wxCHECK_MSG( data, image, wxT("unable to create image") ); - + if (M_IMGDATA->m_hasMask) image.SetMaskColour( M_IMGDATA->m_maskRed, M_IMGDATA->m_maskGreen, M_IMGDATA->m_maskBlue ); memcpy( data, GetData(), M_IMGDATA->m_width*M_IMGDATA->m_height*3 ); - + return image; } @@ -368,7 +368,7 @@ void wxImage::Paste( const wxImage &image, int x, int y ) int yy = 0; int width = image.GetWidth(); int height = image.GetHeight(); - + if (x < 0) { xx = -x; @@ -379,25 +379,25 @@ void wxImage::Paste( const wxImage &image, int x, int y ) yy = -y; height += y; } - + if ((x+xx)+width > M_IMGDATA->m_width) width = M_IMGDATA->m_width - (x+xx); if ((y+yy)+height > M_IMGDATA->m_height) height = M_IMGDATA->m_height - (y+yy); - + if (width < 1) return; if (height < 1) return; - + if ((!HasMask() && !image.HasMask()) || - ((HasMask() && image.HasMask() && - (GetMaskRed()==image.GetMaskRed()) && - (GetMaskGreen()==image.GetMaskGreen()) && + ((HasMask() && image.HasMask() && + (GetMaskRed()==image.GetMaskRed()) && + (GetMaskGreen()==image.GetMaskGreen()) && (GetMaskBlue()==image.GetMaskBlue())))) { width *= 3; unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth(); int source_step = image.GetWidth()*3; - + unsigned char* target_data = GetData() + (x+xx)*3 + (y+yy)*3*M_IMGDATA->m_width; int target_step = M_IMGDATA->m_width*3; for (int j = 0; j < height; j++) @@ -887,9 +887,7 @@ void wxImage::CleanUpHandlers() wxImageHandler *handler = (wxImageHandler *)node->Data(); wxNode *next = node->Next(); delete handler; -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete node; -#endif node = next; } } diff --git a/src/common/list.cpp b/src/common/list.cpp index c2d8de9c1b..971dca379c 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -373,9 +373,7 @@ void wxListBase::DoDeleteNode(wxNodeBase *node) // so that the node knows that it's being deleted by the list node->m_list = NULL; -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete node; -#endif } wxNodeBase *wxListBase::DetachNode(wxNodeBase *node) @@ -534,9 +532,7 @@ void wxListBase::Sort(const wxSortCompareFunction compfunc) void wxObjectListNode::DeleteData() { -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) delete (wxObject *)GetData(); -#endif } // ----------------------------------------------------------------------------- diff --git a/src/common/object.cpp b/src/common/object.cpp index 19bfac0eab..00dfc6aa72 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -363,10 +363,7 @@ void wxObject::UnRef() wxASSERT_MSG( m_refData->m_count > 0, _T("invalid ref data count") ); if ( !--m_refData->m_count ) -#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 ))) -// Until we figure this out delete m_refData; -#endif m_refData = (wxObjectRefData *) NULL; } } diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 70212180d5..2f43d0d55a 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -125,12 +125,7 @@ void wxWindowBase::InitBase() m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT); // GRG, changed Mar/2000 -#if defined(__VISAGECPP__) && __IBMCPP__ < 0x400 - // For now VisualAge 3.0 needs it this way - m_font = *wxSWISS_FONT; // and this? -#else m_font = settings.GetSystemFont(wxSYS_DEFAULT_GUI_FONT); -#endif // no style bits m_exStyle = m_windowStyle = 0;