return NULL from the functions returning a pointer, not FALSE (patch 544557)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
81b299966d
commit
f7f50f493b
@ -146,7 +146,7 @@ size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format )
|
|||||||
{
|
{
|
||||||
wxDataObjectSimple *dataObj = GetObject(format);
|
wxDataObjectSimple *dataObj = GetObject(format);
|
||||||
|
|
||||||
wxCHECK_MSG( dataObj, FALSE,
|
wxCHECK_MSG( dataObj, 0,
|
||||||
wxT("unsupported format in wxDataObjectComposite"));
|
wxT("unsupported format in wxDataObjectComposite"));
|
||||||
|
|
||||||
return dataObj->GetBufferOffset( format );
|
return dataObj->GetBufferOffset( format );
|
||||||
@ -158,7 +158,7 @@ const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer,
|
|||||||
{
|
{
|
||||||
wxDataObjectSimple *dataObj = GetObject(format);
|
wxDataObjectSimple *dataObj = GetObject(format);
|
||||||
|
|
||||||
wxCHECK_MSG( dataObj, FALSE,
|
wxCHECK_MSG( dataObj, NULL,
|
||||||
wxT("unsupported format in wxDataObjectComposite"));
|
wxT("unsupported format in wxDataObjectComposite"));
|
||||||
|
|
||||||
return dataObj->GetSizeFromBuffer( buffer, size, format );
|
return dataObj->GetSizeFromBuffer( buffer, size, format );
|
||||||
@ -169,7 +169,7 @@ void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size,
|
|||||||
{
|
{
|
||||||
wxDataObjectSimple *dataObj = GetObject(format);
|
wxDataObjectSimple *dataObj = GetObject(format);
|
||||||
|
|
||||||
wxCHECK_MSG( dataObj, FALSE,
|
wxCHECK_MSG( dataObj, NULL,
|
||||||
wxT("unsupported format in wxDataObjectComposite"));
|
wxT("unsupported format in wxDataObjectComposite"));
|
||||||
|
|
||||||
return dataObj->SetSizeInBuffer( buffer, size, format );
|
return dataObj->SetSizeInBuffer( buffer, size, format );
|
||||||
|
@ -370,10 +370,8 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len)
|
|||||||
case CF_TIFF:
|
case CF_TIFF:
|
||||||
case CF_PALETTE:
|
case CF_PALETTE:
|
||||||
case wxDF_DIB:
|
case wxDF_DIB:
|
||||||
{
|
wxLogError(_("Unsupported clipboard format."));
|
||||||
wxLogError(_("Unsupported clipboard format."));
|
return NULL;
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
case wxDF_OEMTEXT:
|
case wxDF_OEMTEXT:
|
||||||
dataFormat = wxDF_TEXT;
|
dataFormat = wxDF_TEXT;
|
||||||
|
@ -659,7 +659,7 @@ HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo)
|
|||||||
npPal = (LPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
|
npPal = (LPLOGPALETTE)malloc(sizeof(LOGPALETTE) +
|
||||||
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
|
(WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY));
|
||||||
if (!npPal)
|
if (!npPal)
|
||||||
return(FALSE);
|
return NULL;
|
||||||
|
|
||||||
npPal->palVersion = 0x300;
|
npPal->palVersion = 0x300;
|
||||||
npPal->palNumEntries = (WORD)lpInfo->biClrUsed;
|
npPal->palNumEntries = (WORD)lpInfo->biClrUsed;
|
||||||
|
@ -293,7 +293,7 @@ PDIB wxDibReadBitmapInfo(HFILE fh)
|
|||||||
off = _llseek(fh,0L,SEEK_CUR);
|
off = _llseek(fh,0L,SEEK_CUR);
|
||||||
|
|
||||||
if (sizeof(bf) != _lread(fh,(LPSTR)&bf,sizeof(bf)))
|
if (sizeof(bf) != _lread(fh,(LPSTR)&bf,sizeof(bf)))
|
||||||
return FALSE;
|
return NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do we have a RC HEADER?
|
* do we have a RC HEADER?
|
||||||
|
@ -673,7 +673,8 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
|||||||
{
|
{
|
||||||
wxMenu *menuOld = wxMenuBarBase::Replace(pos, menu, title);
|
wxMenu *menuOld = wxMenuBarBase::Replace(pos, menu, title);
|
||||||
if ( !menuOld )
|
if ( !menuOld )
|
||||||
return FALSE;
|
return NULL;
|
||||||
|
|
||||||
m_titles[pos] = title;
|
m_titles[pos] = title;
|
||||||
|
|
||||||
if ( IsAttached() )
|
if ( IsAttached() )
|
||||||
|
Loading…
Reference in New Issue
Block a user