From 77eddfb7f55ba85099e109ec65cf084ebf3dd77c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 6 Feb 2005 16:02:39 +0000 Subject: [PATCH] fixing NULL warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/cursor.cpp | 2 +- src/mac/carbon/font.cpp | 24 ++++++++++++------------ src/mac/carbon/listbox.cpp | 2 +- src/mac/carbon/macnotfy.cpp | 4 ++-- src/mac/carbon/thread.cpp | 2 +- src/mac/carbon/uma.cpp | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/mac/carbon/cursor.cpp b/src/mac/carbon/cursor.cpp index eace8c0b5d..839673c2dd 100644 --- a/src/mac/carbon/cursor.cpp +++ b/src/mac/carbon/cursor.cpp @@ -318,7 +318,7 @@ void wxCursor::CreateFromImage(const wxImage & image) (**ch).crsrHotSpot.h = hotSpotX ; (**ch).crsrHotSpot.v = hotSpotY ; - (**ch).crsrXTable = NULL ; + (**ch).crsrXTable = 0 ; (**ch).crsrID = GetCTSeed() ; memset( (**ch).crsr1Data , 0 , sizeof( Bits16 ) ) ; diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index d50e88a918..6a6ab75b09 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -509,31 +509,31 @@ void wxFont::SetNoAntiAliasing( bool no ) int wxFont::GetPointSize() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_pointSize; } int wxFont::GetFamily() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_family; } int wxFont::GetStyle() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_style; } int wxFont::GetWeight() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_weight; } bool wxFont::GetUnderlined() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") ); return M_FONTDATA->m_underlined; } @@ -551,31 +551,31 @@ wxFontEncoding wxFont::GetEncoding() const bool wxFont::GetNoAntiAliasing() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , false, wxT("invalid font") ); return M_FONTDATA->m_noAA; } short wxFont::MacGetFontNum() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_macFontNum; } short wxFont::MacGetFontSize() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_macFontSize; } wxByte wxFont::MacGetFontStyle() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_macFontStyle; } wxUint32 wxFont::MacGetATSUFontID() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_macATSUFontID; } @@ -587,13 +587,13 @@ void* wxFont::MacGetATSUStyle() const wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_macATSUAdditionalQDStyles; } wxUint16 wxFont::MacGetThemeFontID() const { - wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") ); + wxCHECK_MSG( M_FONTDATA != NULL , 0, wxT("invalid font") ); return M_FONTDATA->m_macThemeFontID; } diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 7c8ca90473..b4b4edc23d 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -265,7 +265,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, wxListBox::~wxListBox() { - m_peer->SetReference( NULL ) ; + m_peer->SetReference( 0 ) ; FreeData() ; // avoid access during destruction if ( m_macList ) diff --git a/src/mac/carbon/macnotfy.cpp b/src/mac/carbon/macnotfy.cpp index 08d304bb49..8d22be40fd 100644 --- a/src/mac/carbon/macnotfy.cpp +++ b/src/mac/carbon/macnotfy.cpp @@ -40,7 +40,7 @@ void wxMacCreateNotifierTable() for ( int i = 0 ; i < kMaxEvents ; ++i ) { gMacNotificationEvents.proc[i] = NULL ; - gMacNotificationEvents.events[i] = NULL ; + gMacNotificationEvents.events[i] = 0 ; gMacNotificationEvents.data[i] = NULL ; } } @@ -119,7 +119,7 @@ void wxMacProcessNotifierEvents() wxMacNotificationProcPtr handler = gMacNotificationEvents.proc[index] ; gMacNotificationEvents.data[index] = NULL ; - gMacNotificationEvents.events[index] = NULL ; + gMacNotificationEvents.events[index] = 0 ; gMacNotificationEvents.proc[index] = NULL ; if ( handler ) diff --git a/src/mac/carbon/thread.cpp b/src/mac/carbon/thread.cpp index 010a4c5cff..0915d13a23 100644 --- a/src/mac/carbon/thread.cpp +++ b/src/mac/carbon/thread.cpp @@ -1638,7 +1638,7 @@ bool wxThreadModule::OnInit() verify_noerr( MPAllocateTaskStorageIndex( &gs_tlsForWXThread ) ) ; // main thread's This() is NULL - verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , NULL ) ) ; + verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , 0 ) ) ; gs_idMainThread = wxThread::GetCurrentId() ; diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 9f577b30f5..ba57727478 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -194,7 +194,7 @@ long UMAGetProcessMode() ProcessInfoRec processinfo; ProcessSerialNumber procno ; - procno.highLongOfPSN = NULL ; + procno.highLongOfPSN = 0 ; procno.lowLongOfPSN = kCurrentProcess ; processinfo.processInfoLength = sizeof(ProcessInfoRec); processinfo.processName = NULL; -- 2.49.0