[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Fri Nov 4 18:33:01 CET 2005


SVN commit 477678 by staikos:

C++ify (delete null is valid)


 M  +6 -9      kstbasecurve.cpp  


--- trunk/extragear/graphics/kst/kst/kstbasecurve.cpp #477677:477678
@@ -36,10 +36,8 @@
 
 
 KstBaseCurve::~KstBaseCurve() {
-  if (_parsedLegendTag) {
-    delete _parsedLegendTag;
-    _parsedLegendTag = 0L;
-  }
+  delete _parsedLegendTag;
+  _parsedLegendTag = 0L;
 }
 
 
@@ -55,14 +53,13 @@
   _ignoreAutoScale = ignoreAutoScale;
 }
 
+
 Label::Parsed *KstBaseCurve::parsedLegendTag(){
   //FIXME: massive optimization needed, but this will get us going for now.
-  if (_parsedLegendTag) {
-    delete _parsedLegendTag;
-  }
+  delete _parsedLegendTag;
   _parsedLegendTag = Label::parse(tagName(), true);
-  
-  return (_parsedLegendTag);
+
+  return _parsedLegendTag;
 }
 
 // vim: ts=2 sw=2 et


More information about the Kst mailing list