Commit e3a36059 authored by Oliver Bock's avatar Oliver Bock
Browse files

Reduced explicitness

git-svn-id: https://svn.origo.ethz.ch/fidelity@25 53d1999f-d1a8-4366-aa61-588fded17473
parent 0a51451e
......@@ -136,7 +136,7 @@ Fidelity::GUI::ComponentItem::ComponentItem(QPointer<IComponent> component)
Fidelity::GUI::ComponentItem::~ComponentItem()
{
// Delete children and attached links
if(m_Label) {delete m_Label;}
if(m_Label) delete m_Label;
for(int i = 0; i<m_LinkItemList->size(); ++i) {
// Schedules link for deletion (wait for event loop!)
......@@ -148,10 +148,10 @@ Fidelity::GUI::ComponentItem::~ComponentItem()
}
// Clean up members
if(m_NodeItemList) {delete m_NodeItemList;}
if(m_LinkItemList) {delete m_LinkItemList;}
if(m_ParameterModel) {delete m_ParameterModel;}
if(m_Component) {delete m_Component;}
if(m_NodeItemList) delete m_NodeItemList;
if(m_LinkItemList) delete m_LinkItemList;
if(m_ParameterModel) delete m_ParameterModel;
if(m_Component) delete m_Component;
}
// Public methods
......
......@@ -51,12 +51,12 @@ Fidelity::GUI::MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl) : QMainWin
Fidelity::GUI::MainWindow::~MainWindow()
{
// Deletes also m_ComponentCache
if(m_ComponentFactory!=NULL) {delete m_ComponentFactory;}
if(m_ComponentFactory!=NULL) delete m_ComponentFactory;
delete m_ComponentItemTable;
delete m_ToolboxContents;
delete m_WorkbenchScene;
if(m_ActiveEngine!=NULL) {delete m_ActiveEngine;}
if(m_ActiveEngine!=NULL) delete m_ActiveEngine;
delete m_ZoomLevelActionGroup;
delete m_EngineParamModel;
delete m_GlobalsParamModel;
......@@ -523,7 +523,7 @@ void Fidelity::GUI::MainWindow::on_cmbEngine_currentIndexChanged(int index)
QString identifier = cmbEngine->itemData(index).toString();
// Clean up before instantiating new engine
if(m_ActiveEngine!=NULL) {delete m_ActiveEngine;}
if(m_ActiveEngine!=NULL) delete m_ActiveEngine;
if(!identifier.isEmpty()) {
// Create engine instance based on chosen identifier
......
......@@ -41,9 +41,9 @@ Fidelity::Plugin::Component::FabryPerotCavity::~FabryPerotCavity()
delete m_BeamNode1;
delete m_BeamNode2;
if(m_MirrorWest) {delete m_MirrorWest;}
if(m_Space) {delete m_Space;}
if(m_MirrorEast) {delete m_MirrorEast;}
if(m_MirrorWest) delete m_MirrorWest;
if(m_Space) delete m_Space;
if(m_MirrorEast) delete m_MirrorEast;
}
void Fidelity::Plugin::Component::FabryPerotCavity::initAttributes()
......
......@@ -27,7 +27,7 @@ Fidelity::Common::VOBinary::VOBinary()
Fidelity::Common::VOBinary::~VOBinary()
{
if(m_Stream){delete m_Stream;}
if(m_Stream) delete m_Stream;
}
void Fidelity::Common::VOBinary::initAttributes()
......
......@@ -27,9 +27,9 @@ Fidelity::Common::VOData::VOData()
Fidelity::Common::VOData::~VOData()
{
if(m_TableData) {delete m_TableData;}
if(m_Fits) {delete m_Fits;}
if(m_Binary) {delete m_Binary;}
if(m_TableData) delete m_TableData;
if(m_Fits) delete m_Fits;
if(m_Binary) delete m_Binary;
}
void Fidelity::Common::VOData::initAttributes()
......
......@@ -27,8 +27,8 @@ Fidelity::Common::VOField::VOField()
Fidelity::Common::VOField::~VOField()
{
if(m_Values) {delete m_Values;}
if(m_LinkList) {delete m_LinkList;}
if(m_Values) delete m_Values;
if(m_LinkList) delete m_LinkList;
}
void Fidelity::Common::VOField::initAttributes()
......
......@@ -27,7 +27,7 @@ Fidelity::Common::VOFits::VOFits()
Fidelity::Common::VOFits::~VOFits()
{
if(m_Stream){delete m_Stream;}
if(m_Stream) delete m_Stream;
}
void Fidelity::Common::VOFits::initAttributes()
......
......@@ -27,7 +27,7 @@ Fidelity::Common::VOParam::VOParam()
Fidelity::Common::VOParam::~VOParam()
{
if(m_Values){delete m_Values;}
if(m_Values) delete m_Values;
delete m_LinkList;
}
......
......@@ -33,7 +33,7 @@ VOTR::~VOTR()
// iterate over list and delete all referenced entries
while (!m_TDList->isEmpty()) {
QPointer<VOTD> entry = m_TDList->takeFirst();
if(entry) {delete entry;}
if(entry) delete entry;
}
delete m_TDList;
......
......@@ -31,7 +31,7 @@ Fidelity::Common::VOTable::~VOTable()
delete m_ParamList;
delete m_GroupList;
delete m_LinkList;
if(m_Data){delete m_Data;}
if(m_Data) delete m_Data;
}
void Fidelity::Common::VOTable::initAttributes()
......
......@@ -34,7 +34,7 @@ VOTableData::~VOTableData()
unsigned long size = m_TRList->size();
for (unsigned long i = 0; i < size; ++i) {
if(m_TRList->at(i)) {delete m_TRList->at(i);}
if(m_TRList->at(i)) delete m_TRList->at(i);
}
delete m_TRList;
......
......@@ -27,8 +27,8 @@ Fidelity::Common::VOValues::VOValues()
Fidelity::Common::VOValues::~VOValues()
{
if(m_Min){delete m_Min;}
if(m_Max){delete m_Max;}
if(m_Min) delete m_Min;
if(m_Max) delete m_Max;
delete m_OptionList;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment