]> git.saurik.com Git - wxWidgets.git/commitdiff
return NULL from the functions returning a pointer, not FALSE (patch 544557)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 16 Apr 2002 08:57:36 +0000 (08:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 16 Apr 2002 08:57:36 +0000 (08:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dobjcmn.cpp
src/msw/clipbrd.cpp
src/msw/dib.cpp
src/msw/dibutils.cpp
src/msw/menu.cpp

index 661b8114dc28008f311f4f3a87bdde4c100a01e7..08b9a0e923545f16967fa8f2e269e738e3fc37d7 100644 (file)
@@ -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 );
index 013448c3aca509fb4c27c7bda1ad290010405883..a3b4611af4125afeda6e654fe50882987ad67b97 100644 (file)
@@ -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;
index c48d865d23dc5011bda70f4c6d2805c5c4a0421a..5267d9158767bfbe070775d178a966c53eb6c6f8 100644 (file)
@@ -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;
index 6ee22bf3042319fadbeb2a968f3f190f656c45ed..0dae6b739915f2a08406268453e542f5eeaf08e9 100644 (file)
@@ -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?
index 659634d90a13020b54d1434fa0ec6072b0d77d57..eb78604c7d7cfed7d21b6981b0dae88a17bd0116 100644 (file)
@@ -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() )