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
This commit is contained in:
David Webster
2000-05-22 14:03:03 +00:00
parent 7a702aa804
commit fd4afea729
5 changed files with 12 additions and 28 deletions

View File

@@ -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 */

View File

@@ -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;
}
}

View File

@@ -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
}
// -----------------------------------------------------------------------------

View File

@@ -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;
}
}

View File

@@ -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;