mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 18:56:31 +00:00
Removed un-needed null pointer checks in DPX code. Ref #16
This commit is contained in:
parent
1f75034da2
commit
0a19eeb602
@ -22,7 +22,7 @@ GPViewProductNode::~GPViewProductNode() {
|
||||
n = (int)page_node_list.size();
|
||||
for (i=0 ; i<n; i++ ) {
|
||||
page_view_node = page_node_list[i];
|
||||
if (page_view_node) { delete page_view_node; }
|
||||
delete page_view_node;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -169,10 +169,10 @@ DPC_delta_curve::DPC_delta_curve( DPM_curve* Curve_spec,
|
||||
DPC_delta_curve::~DPC_delta_curve() {
|
||||
|
||||
// We ONLY delete what we create.
|
||||
if ( delta_x_var ) { delete delta_x_var; };
|
||||
if ( delta_y_var ) { delete delta_y_var; };
|
||||
if ( ds[0] ) { delete ds[0]; };
|
||||
if ( ds[1] ) { delete ds[1]; };
|
||||
delete delta_x_var;
|
||||
delete delta_y_var;
|
||||
delete ds[0];
|
||||
delete ds[1];
|
||||
if ( x_actual_units ) { free( x_actual_units); }
|
||||
if ( y_actual_units ) { free( y_actual_units); }
|
||||
if ( run_dir1 ) { free( run_dir1); }
|
||||
|
@ -125,17 +125,17 @@ DPC_product::~DPC_product() {
|
||||
int n_pages, pagix;
|
||||
int n_tables, tabix;
|
||||
|
||||
if (product_spec) { delete product_spec; }
|
||||
if (datastream_supplier) { delete datastream_supplier; }
|
||||
delete product_spec;
|
||||
delete datastream_supplier;
|
||||
n_pages = (int)page_list.size();
|
||||
for (pagix = 0 ; pagix < n_pages ; pagix ++) {
|
||||
page = page_list[pagix];
|
||||
if (page) { delete page; }
|
||||
delete page;
|
||||
}
|
||||
n_tables = (int)table_list.size();
|
||||
for (tabix = 0 ; tabix < n_tables ; tabix ++) {
|
||||
table = table_list[tabix];
|
||||
if (table) { delete table; }
|
||||
delete table;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ DPM_column::DPM_column(DPM_component *Parent, xmlNode *Base_node) throw (std::i
|
||||
DPM_column::~DPM_column() {
|
||||
if (unitspec) { free (unitspec); }
|
||||
if (label) { free (label); }
|
||||
if (column_var) { delete column_var ; }
|
||||
delete column_var ;
|
||||
}
|
||||
|
||||
// MEMBER FUNCTION
|
||||
|
@ -103,9 +103,9 @@ DPM_relation::DPM_relation(DPM_component *Parent, xmlNode *Base_node) throw (st
|
||||
// MEMBER FUNCTION
|
||||
DPM_relation::~DPM_relation() {
|
||||
|
||||
if (xaxis) { delete xaxis; }
|
||||
if (yaxis) { delete yaxis; }
|
||||
if (zaxis) { delete zaxis; }
|
||||
delete xaxis;
|
||||
delete yaxis;
|
||||
delete zaxis;
|
||||
if (title) { free( title); }
|
||||
// destroy each of the curves in the curves list
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user