[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Wed May 7 20:36:16 CEST 2003
CVS commit by staikos:
The last uninitialised var (tricky to track this one down).
Also a few minor reformatting and setting freed variables to 0L.
M +11 -4 kstequationcurve.cpp 1.8
M +2 -0 kstvector.cpp 1.6
--- kdeextragear-2/kst/kst/kstequationcurve.cpp #1.7:1.8
@@ -166,4 +166,5 @@ KstEquationCurve::~KstEquationCurve() {
vlist->remove(SlaveY);
delete SlaveY;
+ SlaveY = 0L;
}
@@ -252,5 +253,5 @@ void KstEquationCurve::commonConstructor
bool KstEquationCurve::isValid() {
- return (IsValid);
+ return IsValid;
}
@@ -312,5 +313,8 @@ void KstEquationCurve::setEquation(const
void KstEquationCurve::setExistingXVector(KstVector *in_xv,
const bool &do_interp) {
- if (IsXStatic) free(staticX);
+ if (IsXStatic) {
+ free(staticX);
+ staticX = 0L;
+ }
VX->decUsage();
@@ -331,5 +335,8 @@ void KstEquationCurve::setStaticXVector(
double tx;
- if (IsXStatic) free(staticX);
+ if (IsXStatic) {
+ free(staticX);
+ staticX = 0L;
+ }
if (nx<2) nx=2;
@@ -691,5 +698,5 @@ bool KstEquationCurve::FillY(const bool
if (NumShifted>NS) NumShifted = NS;
- NumNew = NS - i0 + SlaveY ->numNew();
+ NumNew = NS - i0 + SlaveY->numNew();
if (NumNew>NS) NumNew = NS;
--- kdeextragear-2/kst/kst/kstvector.cpp #1.5:1.6
@@ -30,4 +30,6 @@ KstVector::KstVector() {
Sum2 = 0;
ScalarList = 0L;
+ NumShifted = 0;
+ NumNew = 0;
}
More information about the Kst
mailing list