[Kst] Test Failures

George Staikos staikos at kde.org
Wed Aug 6 03:15:01 CEST 2003


On Tuesday 05 August 2003 18:48, C. Barth Netterfield wrote:
> > > Resize a vector to have 1 element.  Should vectors be required to be of
> > > size 2 or more?  I think so, but it allowed me to resize it to 1
> > > element.
> >
> >   Fixed.
>
> I think 2 or longer should be required.

  Yes I adjusted this accordingly.

> > > These ones are fun.  I resized a vector from 3->5 elements, and
> > > elements 4 and 5 looked like this.
> >
> >    Basically it's uninitialised memory, but I think it would be a good
> > idea to initialise it to 0.  What do you think?
>
> I guess so....  when do we do this?  We really shouldn't I would think; so
> setting to 0 is good.

kstequationcurve.cpp:    yv->resize(NS);
kstpsdcurve.cpp:  _outputVectors[0]->resize(PSDLen);
kstrvector.cpp:      resize(new_nf/Skip);
kstrvector.cpp:      resize((new_nf-1)*SPF + 1);

   The question is, where will we do this in the future?

   Note: clearing while resizing does add a performance penalty of course, 
though I can use memset which will ideally be optimized by the compiler for 
the given platform.

-- 
George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/



More information about the Kst mailing list