[Marble-devel] [Patch] Remove redundant null pointer checks

Torsten Rahn torsten.rahn at credativ.de
Fri Apr 11 18:07:39 CEST 2008


Hi Jens-Michael,

Thanks for your patch! I've just applied it.

Could you please send your patches as an attachment instead of pasting them 
into the body of the mail directly?

Thanks in advance :-)

Torsten

On Friday 11 April 2008 14:56:20 Jens-Michael Hoffmann wrote:
> 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
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel



-- 
 Torsten Rahn

 Tel.: 0 21 61 - 46 43 - 192

credativ GmbH, HRB Mönchengladbach 12080
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz


More information about the Marble-devel mailing list