[Kst] extragear/graphics/kst/src/datasources/scuba2

Andrew Walker arwalker at sumusltd.com
Tue Mar 27 20:17:12 CEST 2007


SVN commit 647214 by arwalker:

remove compiler warning

 M  +36 -39    scuba.cpp  


--- trunk/extragear/graphics/kst/src/datasources/scuba2/scuba.cpp #647213:647214
@@ -645,10 +645,10 @@
                   for (j=0; j<xNumSteps; j++) {
                     if (j < int(entries.size())) {
                       lvalue = entries[j].toInt(&ok, 10);
-                      if (!ok) {
-                        rawValues[(i * xNumSteps) + j] = KST::NOPOINT;
-                      } else {
+                      if (ok) {
                         rawValues[(i * xNumSteps) + j] = lvalue;
+                      } else {
+                        rawValues[(i * xNumSteps) + j] = 0;
                       }
                     }
                   }
@@ -659,48 +659,45 @@
                 for (j=0; j<yNumSteps; j++) {
                   if ((j * xNumSteps) + i < length) {
                     lvalue = rawValues[(j * xNumSteps) + i];
-                    if (!ok) {
-                      *values = KST::NOPOINT;
-                    } else {
-                      switch (_datamode) {
-                        case DataError:
-                        case DataPreScaleFeedback:
-                        case DataFiltered:
-                        case DataRaw:
-                          break;
-                        case Data18_14:
-                          if (!error) {
-                            lvalue /= 0x4000;
-                          } else {
-                            lvalue &= 0x3FFF;
-                            if (lvalue & 0x2000) {
-                              lvalue -= 0x4000;
-                            }
+
+                    switch (_datamode) {
+                      case DataError:
+                      case DataPreScaleFeedback:
+                      case DataFiltered:
+                      case DataRaw:
+                        break;
+                      case Data18_14:
+                        if (!error) {
+                          lvalue /= 0x4000;
+                        } else {
+                          lvalue &= 0x3FFF;
+                          if (lvalue & 0x2000) {
+                            lvalue -= 0x4000;
                           }
-                          break;
-                        case Data24_8:
-                          if (!error) {
-                            lvalue /= 0x100;
-                          } else {
-                            lvalue &= 0xFF;
-                            if (lvalue & 0x80) {
-                              lvalue -= 0x100;
-                            }
+                        }
+                        break;
+                      case Data24_8:
+                        if (!error) {
+                          lvalue /= 0x100;
+                        } else {
+                          lvalue &= 0xFF;
+                          if (lvalue & 0x80) {
+                            lvalue -= 0x100;
                           }
-                          break;
-                      }
-  
-                      if (max) {
-                        if (frame > frameStart && double(lvalue) > *values) {
-                          *values = double(lvalue);
                         }
-                      } else if (avg) {
-                        *values += double(lvalue);
-                      } else {
+                        break;
+                    }
+  
+                    if (max) {
+                      if (frame > frameStart && double(lvalue) > *values) {
                         *values = double(lvalue);
                       }
+                    } else if (avg) {
+                      *values += double(lvalue);
+                    } else {
+                      *values = double(lvalue);
                     }
-  
+
                     ++values;
                   }
                 }


More information about the Kst mailing list