[Kst] branches/work/kst/hierarchy/kst/src/libkstmath

Eli Fidler eli at staikos.net
Fri Dec 1 21:57:52 CET 2006


SVN commit 609723 by fidler:

fix uninitialized variables


 M  +20 -13    kstplotdefines.h  


--- branches/work/kst/hierarchy/kst/src/libkstmath/kstplotdefines.h #609722:609723
@@ -79,20 +79,27 @@
   { I18N_NOOP("<KDE Long Date and Time>"), AXIS_DISPLAY_KDE_LONGDATE }
 };
 
-typedef struct TickParameters {
-  double org;
-  double tick;
-  bool delta;
-  double maxWidth;
-  double maxHeight;
-  QStringList labels;
-  int iHi;
-  int iLo;
-  QStringList oppLabels; // labels for the opposite axis
-  double oppMaxWidth;
-  double oppMaxHeight;
-} TickParameters;
+class TickParameters {
+  public:
+    // FIXME: use reasonable defaults
+    TickParameters() : org(0.0), tick(0.0), delta(false), maxWidth(0.0),
+                       maxHeight(0.0), iHi(0), iLo(0), oppMaxWidth(0.0),
+                       oppMaxHeight(0.0)
+    {}
 
+    double org;
+    double tick;
+    bool delta;
+    double maxWidth;
+    double maxHeight;
+    QStringList labels;
+    int iHi;
+    int iLo;
+    QStringList oppLabels; // labels for the opposite axis
+    double oppMaxWidth;
+    double oppMaxHeight;
+};
+
 const unsigned int numAxisInterpretations = sizeof( AxisInterpretations ) / sizeof( AxisInterpretation );
 const unsigned int numAxisDisplays = sizeof( AxisDisplays ) / sizeof( AxisDisplay );
 


More information about the Kst mailing list