From 7394df755f8a554e94be5f3a4f80de3090f577ee Mon Sep 17 00:00:00 2001 From: Sean Rhea Date: Sat, 7 Nov 2009 14:27:01 -0500 Subject: [PATCH] delete NULL is a no-op --- src/CpintPlot.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/CpintPlot.cpp b/src/CpintPlot.cpp index 1ce2f07a8..c9b46af29 100644 --- a/src/CpintPlot.cpp +++ b/src/CpintPlot.cpp @@ -413,19 +413,15 @@ CpintPlot::clear_CP_Curves() { // unattach any existing shading curves and reset the list if (allCurves.size()) { - foreach (QwtPlotCurve *curve, allCurves) { - if (curve) - delete curve; - } + foreach (QwtPlotCurve *curve, allCurves) + delete curve; allCurves.clear(); } // now delete any labels if (allZoneLabels.size()) { - foreach (QwtPlotMarker *label, allZoneLabels) { - if (label) - delete label; - } + foreach (QwtPlotMarker *label, allZoneLabels) + delete label; allZoneLabels.clear(); } }