[PPL-devel] [GIT] ppl/ppl(pip): No need to check for null pointers before deleting them .

Enea Zaffanella zaffanella at cs.unipr.it
Sat Jan 30 20:41:54 CET 2010


Module: ppl/ppl
Branch: pip
Commit: 299dafac1f95cef1e2c6901dbbe125ec2d9a10b0
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=299dafac1f95cef1e2c6901dbbe125ec2d9a10b0

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Sat Jan 30 18:57:29 2010 +0100

No need to check for null pointers before deleting them.

---

 src/PIP_Problem.cc |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/PIP_Problem.cc b/src/PIP_Problem.cc
index a4b0b2d..9f23bb2 100644
--- a/src/PIP_Problem.cc
+++ b/src/PIP_Problem.cc
@@ -70,8 +70,7 @@ PPL::PIP_Problem::PIP_Problem(const PIP_Problem &y)
 }
 
 PPL::PIP_Problem::~PIP_Problem() {
-  if (current_solution != 0)
-    delete current_solution;
+  delete current_solution;
 }
 
 void




More information about the PPL-devel mailing list