[Kst] kdeextragear-2/kst/kst/datasources/cdf

George Staikos staikos at kde.org
Fri Nov 5 19:01:59 CET 2004


CVS commit by staikos: 

big speed and correctness improvement, approved by Nicolas


  M +5 -1      cdf.cpp   1.13


--- kdeextragear-2/kst/kst/datasources/cdf/cdf.cpp  #1.12:1.13
@@ -136,5 +136,9 @@ int CdfSource::readField(double *v, cons
   // Handle the special case where we query INDEX
   if (field.lower() == "index") {
-    for (i = 0; i < n; i++) {
+    if (n < 0) {
+      v[0] = double(s);
+      return 1;
+    }
+    for (int i = 0; i < n; ++i) {
       v[i] = double(s + i);
     }





More information about the Kst mailing list