[Kst] extragear/graphics/kst/kst
George Staikos
staikos at kde.org
Wed Jun 29 03:55:31 CEST 2005
On Monday 27 June 2005 21:19, Rick Chern wrote:
> +QMap<QString, KstScalarPtr> KstVector::scalars() const {
> +
> + QMap<QString, KstScalarPtr> scalarMap;
> + scalarMap.insert("max", _scalars["max"]);
> + scalarMap.insert("min", _scalars["min"]);
> + scalarMap.insert("last", _scalars["last"]);
> + scalarMap.insert("mean", _scalars["mean"]);
> + scalarMap.insert("sigma", _scalars["sigma"]);
> + scalarMap.insert("rms", _scalars["rms"]);
> + scalarMap.insert("ns", _scalars["ns"]);
> + scalarMap.insert("sum", _scalars["sum"]);
> + scalarMap.insert("sumsquared", _scalars["sumsquared"]);
> + scalarMap.insert("minpos", _scalars["minpos"]);
> +
> + return scalarMap;
> +}
Do you think it would work to return a const ref to the QDict instead? I
think a dict makes more sense, and returning the const ref is much more
efficient. It's possible that we should consider using QDict in many more
places.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list