Don't test if the variable is not NULL if it is always allocated

Fix another typo

svn path=/trunk/; revision=32535
This commit is contained in:
Hervé Poussineau 2008-02-29 13:45:19 +00:00
parent b720f079e2
commit 67a14cca83
4 changed files with 7 additions and 15 deletions

View file

@ -36,10 +36,8 @@ CDFile::ReplaceVariable ( const string& name,
CDFile::~CDFile () CDFile::~CDFile ()
{ {
if ( source ) delete source;
delete source; delete target;
if ( target )
delete target;
} }
CDFile::CDFile ( const Project& project, CDFile::CDFile ( const Project& project,

View file

@ -59,8 +59,7 @@ CompilationUnit::~CompilationUnit ()
for ( i = 0; i < files.size (); i++ ) for ( i = 0; i < files.size (); i++ )
delete files[i]; delete files[i];
if ( default_name ) delete default_name;
delete default_name;
} }
void void

View file

@ -24,11 +24,8 @@ using std::string;
InstallFile::~InstallFile() InstallFile::~InstallFile()
{ {
if ( source ) delete source;
delete source; delete target;
if ( target )
delete source;
} }
InstallFile::InstallFile ( const Project& project, InstallFile::InstallFile ( const Project& project,

View file

@ -488,14 +488,13 @@ Module::~Module ()
delete pch; delete pch;
if ( install ) if ( install )
delete install; delete install;
if ( output )
delete output;
if ( metadata ) if ( metadata )
delete metadata; delete metadata;
if ( bootstrap ) if ( bootstrap )
delete bootstrap; delete bootstrap;
if ( importLibrary ) if ( importLibrary )
delete importLibrary; delete importLibrary;
delete output;
} }
void void
@ -1598,8 +1597,7 @@ Metadata::Metadata ( const XMLElement& _node,
ImportLibrary::~ImportLibrary () ImportLibrary::~ImportLibrary ()
{ {
if ( source ) delete source;
delete source;
} }