From: Vadim Zeitlin Date: Tue, 16 Apr 2002 08:57:36 +0000 (+0000) Subject: return NULL from the functions returning a pointer, not FALSE (patch 544557) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f7f50f493baa177e8ae07d12641095baee55d4f8 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 --- diff --git a/src/common/dobjcmn.cpp b/src/common/dobjcmn.cpp index 661b8114dc..08b9a0e923 100644 --- a/src/common/dobjcmn.cpp +++ b/src/common/dobjcmn.cpp @@ -146,7 +146,7 @@ size_t wxDataObjectComposite::GetBufferOffset( const wxDataFormat& format ) { wxDataObjectSimple *dataObj = GetObject(format); - wxCHECK_MSG( dataObj, FALSE, + wxCHECK_MSG( dataObj, 0, wxT("unsupported format in wxDataObjectComposite")); return dataObj->GetBufferOffset( format ); @@ -158,7 +158,7 @@ const void* wxDataObjectComposite::GetSizeFromBuffer( const void* buffer, { wxDataObjectSimple *dataObj = GetObject(format); - wxCHECK_MSG( dataObj, FALSE, + wxCHECK_MSG( dataObj, NULL, wxT("unsupported format in wxDataObjectComposite")); return dataObj->GetSizeFromBuffer( buffer, size, format ); @@ -169,7 +169,7 @@ void* wxDataObjectComposite::SetSizeInBuffer( void* buffer, size_t size, { wxDataObjectSimple *dataObj = GetObject(format); - wxCHECK_MSG( dataObj, FALSE, + wxCHECK_MSG( dataObj, NULL, wxT("unsupported format in wxDataObjectComposite")); return dataObj->SetSizeInBuffer( buffer, size, format ); diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 013448c3ac..a3b4611af4 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -370,10 +370,8 @@ void *wxGetClipboardData(wxDataFormat dataFormat, long *len) case CF_TIFF: case CF_PALETTE: case wxDF_DIB: - { - wxLogError(_("Unsupported clipboard format.")); - return FALSE; - } + wxLogError(_("Unsupported clipboard format.")); + return NULL; case wxDF_OEMTEXT: dataFormat = wxDF_TEXT; diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index c48d865d23..5267d91587 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -659,7 +659,7 @@ HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo) npPal = (LPLOGPALETTE)malloc(sizeof(LOGPALETTE) + (WORD)lpInfo->biClrUsed * sizeof(PALETTEENTRY)); if (!npPal) - return(FALSE); + return NULL; npPal->palVersion = 0x300; npPal->palNumEntries = (WORD)lpInfo->biClrUsed; diff --git a/src/msw/dibutils.cpp b/src/msw/dibutils.cpp index 6ee22bf304..0dae6b7399 100644 --- a/src/msw/dibutils.cpp +++ b/src/msw/dibutils.cpp @@ -293,7 +293,7 @@ PDIB wxDibReadBitmapInfo(HFILE fh) off = _llseek(fh,0L,SEEK_CUR); if (sizeof(bf) != _lread(fh,(LPSTR)&bf,sizeof(bf))) - return FALSE; + return NULL; /* * do we have a RC HEADER? diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 659634d90a..eb78604c7d 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -673,7 +673,8 @@ wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title) { wxMenu *menuOld = wxMenuBarBase::Replace(pos, menu, title); if ( !menuOld ) - return FALSE; + return NULL; + m_titles[pos] = title; if ( IsAttached() )