comparison data/fileio/CSVStreamWriter.h @ 1609:560453546749 single-point

Start some sparse model tests
author Chris Cannam
date Tue, 05 Mar 2019 13:21:55 +0000
parents 743c38b209d0
children ea4f3593c39c
comparison
equal deleted inserted replaced
1608:0e0947896fd3 1609:560453546749
56 return reporter && reporter->wasCancelled(); 56 return reporter && reporter->wasCancelled();
57 }; 57 };
58 58
59 sv_frame_t nFramesWritten = 0; 59 sv_frame_t nFramesWritten = 0;
60 int previousProgress = 0; 60 int previousProgress = 0;
61 bool started = false;
61 62
62 for (const auto& extents : selections) { 63 for (const auto& extents : selections) {
63 const auto startFrame = extents.getStartFrame(); 64 const auto startFrame = extents.getStartFrame();
64 const auto endFrame = extents.getEndFrame(); 65 const auto endFrame = extents.getEndFrame();
65 auto readPtr = startFrame; 66 auto readPtr = startFrame;
74 start, 75 start,
75 end 76 end
76 ).trimmed(); 77 ).trimmed();
77 78
78 if ( data != "" ) { 79 if ( data != "" ) {
79 oss << data << (end < finalFrameOfLastRegion ? "\n" : ""); 80 if (started) {
81 oss << "\n";
82 } else {
83 started = true;
84 }
85 oss << data;
80 } 86 }
81 87
82 nFramesWritten += end - start; 88 nFramesWritten += end - start;
83 const int currentProgress = 89 const int currentProgress =
84 int(100 * nFramesWritten / nFramesToWrite); 90 int(100 * nFramesWritten / nFramesToWrite);