]> git.sesse.net Git - vlc/commitdiff
Remove useless test before a delete.
authorRémi Duraffort <ivoire@videolan.org>
Sat, 15 Mar 2008 19:26:02 +0000 (20:26 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 16 Mar 2008 20:34:41 +0000 (21:34 +0100)
modules/demux/live555.cpp
modules/gui/beos/VideoOutput.cpp
modules/gui/qt4/dialogs/interaction.cpp
modules/gui/qt4/qt4.cpp
modules/gui/wince/interface.cpp
modules/gui/wince/wince.cpp
modules/gui/wxwidgets/dialogs/messages.cpp
modules/gui/wxwidgets/interface.cpp
modules/gui/wxwidgets/wxwidgets.cpp

index ce52ecd1e62be062272e42a4b08a9e99f561c91e..9e5035b12457cc8254c28b6222f64cbdfa7b85a1 100644 (file)
@@ -530,7 +530,7 @@ describe:
 
     psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
                                                &authenticator );
-    if( psz_options ) delete [] psz_options;
+    delete [] psz_options;
 
     p_sdp = p_sys->rtsp->describeURL( psz_url, &authenticator,
                          var_GetBool( p_demux, "rtsp-kasenna" ) );
index ca6d69a66a27eefeecd9c6d7e6f95a9e1684e0f0..2f853280df123a223c63f1098697c8d7d7aca935 100644 (file)
@@ -777,20 +777,20 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode)
                 {
                     msg_Dbg( p_vout, "using single-buffered overlay" );
                     bitmap_count = 2;
-                    if( bitmap[2] ) { delete bitmap[2]; bitmap[2] = NULL; }
+                    delete bitmap[2]; bitmap[2] = NULL;
                 }
             }
             else
             {
                 msg_Dbg( p_vout, "using simple overlay" );
                 bitmap_count = 1;
-                if( bitmap[1] ) { delete bitmap[1]; bitmap[1] = NULL; }
+                delete bitmap[1]; bitmap[1] = NULL;
             }
             break;
         }
         else
         {
-            if( bitmap[0] ) { delete bitmap[0]; bitmap[0] = NULL; }
+            delete bitmap[0]; bitmap[0] = NULL;
         }
     }
 
@@ -829,9 +829,9 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode)
 void
 VideoWindow::_FreeBuffers()
 {
-    if( bitmap[0] ) { delete bitmap[0]; bitmap[0] = NULL; }
-    if( bitmap[1] ) { delete bitmap[1]; bitmap[1] = NULL; }
-    if( bitmap[2] ) { delete bitmap[2]; bitmap[2] = NULL; }
+    delete bitmap[0]; bitmap[0] = NULL;
+    delete bitmap[1]; bitmap[1] = NULL;
+    delete bitmap[2]; bitmap[2] = NULL;
     fInitStatus = B_ERROR;
 }
 
index 60f3acce05bc4309c456ac7012a6163f17806fa7..115d8718ceb8c68e98cf561973dc72fb0675992c 100644 (file)
@@ -197,8 +197,8 @@ void InteractionDialog::update()
 
 InteractionDialog::~InteractionDialog()
 {
-//    if( panel ) delete panel;
-    if( dialog ) delete dialog;
+//    delete panel;
+    delete dialog;
 }
 
 void InteractionDialog::defaultB()
index 8deeca222eb10f375ca3d42e28260d09872b3e7f..ccfd614167de201df1f9c610f6c4e4f11ff540e4 100644 (file)
@@ -384,7 +384,7 @@ static void Init( intf_thread_t *p_intf )
 
     /* Destroy first the main interface because it is connected to some slots
        in the MainInputManager */
-    if( p_intf->p_sys->p_mi ) delete p_intf->p_sys->p_mi;
+    delete p_intf->p_sys->p_mi;
 
     /* Destroy then other windows, because some are connected to some slots
        in the MainInputManager */
index 49cd08daca0d5571d80ae4df3bf705cfb2d001f6..174bf7063761e640be7bac464c6dfac1574556aa 100644 (file)
@@ -116,8 +116,8 @@ Interface::Interface( intf_thread_t *p_intf, CBaseWindow *p_parent,
 
 Interface::~Interface()
 {
-    if( timer ) delete timer;
-    if( video ) delete video;
+    delete timer;
+    delete video;
 }
 
 BOOL Interface::InitInstance()
index de3d8214f41d158acc0b0b2e59f180062c9d2772..fce018176b2cfe17e258f56af1356217a435a285 100644 (file)
@@ -273,7 +273,7 @@ static void MainLoop( intf_thread_t *p_intf )
     }
 
  end:
-    if( intf ) delete intf;
+    delete intf;
 
 #ifndef UNDER_CE
     /* Uninitialize OLE/COM */
index 88827462fe28bd1a6289b8be274a1c893ec314a7..24b96439f7a061ec0451f5a49fd6eebdedc88a19 100644 (file)
@@ -102,8 +102,7 @@ Messages::Messages( intf_thread_t *_p_intf, wxWindow *p_parent ):
 Messages::~Messages()
 {
     /* Clean up */
-    if( save_log_dialog ) delete save_log_dialog;
-
+    delete save_log_dialog;
     delete info_attr;
     delete err_attr;
     delete warn_attr;
index 6485c9a2b5bf0d774faf9f5ee00edba4add95030..8a5577f0e3b2d20e02f0c5c639fa8f4bcc2b1bc0 100644 (file)
@@ -512,19 +512,19 @@ Interface::~Interface()
 
     PopEventHandler(true);
 
-    if( video_window ) delete video_window;
+    delete video_window;
 
 /* wxCocoa pretends to support this, but at least 2.6.x doesn't */
 #ifndef __APPLE__
 #ifdef wxHAS_TASK_BAR_ICON
-    if( p_systray ) delete p_systray;
+    delete p_systray;
 #endif
 #endif
 
     p_intf->b_interaction = VLC_FALSE;
     var_DelCallback( p_intf, "interaction", InteractCallback, this );
 
-    if( p_intf->p_sys->p_wxwindow ) delete p_intf->p_sys->p_wxwindow;
+    delete p_intf->p_sys->p_wxwindow;
 
 
     /* Clean up */
index 706f456d4a0bc294c2341aecb7d1ee045f000c17..c6752bcbbfae8ff5ec6c9f51eed9fd9ac2091d0f 100644 (file)
@@ -418,7 +418,7 @@ int Instance::OnExit()
     if( p_intf->pf_show_dialog )
     {
          /* We need to manually clean up the dialogs class */
-         if( p_intf->p_sys->p_wxwindow ) delete p_intf->p_sys->p_wxwindow;
+         delete p_intf->p_sys->p_wxwindow;
     }
 
 #if (wxCHECK_VERSION(2,5,0))