X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b1ca1177d0affb978c2fa7ef227fd74ee83bece..ccef4c3ad16fe5bf4365569c431f1208d79eb0ef:/src/osx/carbon/tooltip.cpp diff --git a/src/osx/carbon/tooltip.cpp b/src/osx/carbon/tooltip.cpp index f7b4857e9e..66f99826e0 100644 --- a/src/osx/carbon/tooltip.cpp +++ b/src/osx/carbon/tooltip.cpp @@ -2,7 +2,6 @@ // Name: src/osx/carbon/tooltip.cpp // Purpose: wxToolTip implementation // Author: Stefan Csomor -// Id: $Id$ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -64,7 +63,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxToolTip, wxObject) wxToolTip::wxToolTip( const wxString &tip ) { m_text = tip; - m_window = (wxWindow*) NULL; + m_window = NULL; } wxToolTip::~wxToolTip() @@ -159,7 +158,7 @@ void wxToolTip::RemoveToolTips() } // --- mac specific -#if wxUSE_TIMER +#if wxUSE_TIMER wxMacToolTipTimer::wxMacToolTipTimer( wxMacToolTip *tip , int msec ) { m_tip = tip; @@ -172,7 +171,7 @@ wxMacToolTip::wxMacToolTip() { m_window = NULL ; m_backpict = NULL ; -#if wxUSE_TIMER +#if wxUSE_TIMER m_timer = NULL ; #endif m_mark = 0 ; @@ -189,7 +188,7 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& m_window =win; s_ToolTipWindowRef = m_window ; m_backpict = NULL ; -#if wxUSE_TIMER +#if wxUSE_TIMER delete m_timer ; m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ; @@ -198,12 +197,8 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& wxMacToolTip::~wxMacToolTip() { -#if wxUSE_TIMER - if ( m_timer ) - { - delete m_timer ; - m_timer = NULL; - } +#if wxUSE_TIMER + wxDELETE(m_timer); #endif // wxUSE_TIMER if ( m_backpict ) Clear() ; @@ -250,12 +245,8 @@ void wxToolTip::NotifyWindowDelete( WXHWND win ) void wxMacToolTip::Clear() { m_mark++ ; -#if wxUSE_TIMER - if ( m_timer ) - { - delete m_timer ; - m_timer = NULL ; - } +#if wxUSE_TIMER + wxDELETE(m_timer); #endif // wxUSE_TIMER if ( !m_shown ) return ;