[Kst] branches/work/kst/portto4/kst/src/datasources/ascii

Peter Kümmel syntheticpp at gmx.net
Wed Oct 17 19:52:59 UTC 2012


SVN commit 1321060 by kuemmel:

this is the result of the cleanup

 M  +3 -13     asciisource.cpp  


--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1321059:1321060
@@ -301,24 +301,14 @@
 
   LexicalCast::AutoDot useDot(_config._useDot);
 
-  int sampleRead = 0;
   QVector<QVector<AsciiFileData> >& slidingWindow = _fileBuffer.fileData();
-  if (_config._useThreads) {
-    if (useSlidingWindow(bytesToRead)) { 
+  int sampleRead = 0;
       for (int i = 0; i< slidingWindow.size(); i++) {
+    if (_config._useThreads)
         sampleRead += parseWindowMultithreaded(slidingWindow[i], col, v, field);
-      }
-    } else {
-      Q_ASSERT(slidingWindow.size() == 1);
-      sampleRead = parseWindowMultithreaded(slidingWindow[0], col, v, field);
-    }
-  } else {
-    sampleRead = 0;
-    for (int i = 0; i < slidingWindow.size(); i++) {
+    else
       sampleRead += parseWindowSinglethreaded(slidingWindow[i], col, v, field, sampleRead);
     }
-  }
-
   return sampleRead;
 }
 


More information about the Kst mailing list