[Marble-devel] [Patch] Remove redundant null pointer checks
Jens-Michael Hoffmann
jensmh at gmx.de
Fri Apr 11 14:56:20 CEST 2008
Index: kdeedu/marble/src/lib/HttpDownloadManager.cpp
===================================================================
--- kdeedu/marble/src/lib/HttpDownloadManager.cpp (Revision 795776)
+++ kdeedu/marble/src/lib/HttpDownloadManager.cpp (Arbeitskopie)
@@ -49,8 +49,7 @@
qDeleteAll( m_jobBlackList );
m_jobBlackList.clear();
- if ( m_storagePolicy != 0 )
- delete m_storagePolicy;
+ delete m_storagePolicy;
}
void HttpDownloadManager::setServerUrl( const QUrl& serverUrl )
Index: kdeedu/marble/src/lib/MarbleModel.cpp
===================================================================
--- kdeedu/marble/src/lib/MarbleModel.cpp (Revision 795776)
+++ kdeedu/marble/src/lib/MarbleModel.cpp (Arbeitskopie)
@@ -275,8 +275,7 @@
qDebug("Tile creation completed");
}
- if ( d->m_texmapper != 0 )
- delete d->m_texmapper;
+ delete d->m_texmapper;
d->m_tileLoader->setMapTheme( "maps/" +
d->m_maptheme->tilePrefix() );
@@ -350,8 +349,7 @@
d->m_tileLoader->setDownloadManager( downloadManager );
d->m_downloadManager = downloadManager;
- if ( previousDownloadManager != 0 )
- delete previousDownloadManager;
+ delete previousDownloadManager;
}
Index: kdeedu/marble/src/plasmoid/worldclock.cpp
===================================================================
--- kdeedu/marble/src/plasmoid/worldclock.cpp (Revision 795776)
+++ kdeedu/marble/src/plasmoid/worldclock.cpp (Arbeitskopie)
@@ -100,8 +100,7 @@
WorldClock::~WorldClock()
{
- if(m_configDialog)
- delete m_configDialog;
+ delete m_configDialog;
}
//We want to redraw the map every 10 mins
More information about the Marble-devel
mailing list