[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kst/portto4/kst/src/datasources/ascii
From: Peter Kümmel <syntheticpp () gmx ! net>
Date: 2013-06-02 6:55:49
Message-ID: 20130602065549.99E99AC866 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1356772 by kuemmel:
fixed sized column reading could start at any row when threads are used.
M +3 -4 asciidatareader.cpp
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciidatareader.cpp \
#1356771:1356772 @@ -220,11 +220,10 @@
if (_config._columnType == AsciiSourceConfig::Fixed) {
//MeasureTime t("AsciiSource::readField: same width for all columns");
const LexicalCast& lexc = LexicalCast::instance();
- // &buffer[0] points to first row at _rowIndex[0] , so if we wanna find
- // the column in row i by adding _rowIndex[i] we have to start at:
- const char*const col_start = &buf.checkedData()[0] - _rowIndex[0] + \
_config._columnWidth * (col - 1); + // buf[0] points to some row start, \
_rowIndex[i] is absolute, so we have to substract buf.begin(). + const char*const \
col_start = &buf.checkedData()[0] + _config._columnWidth * (col - 1) - buf.begin(); \
for (int i = 0; i < n; ++i) {
- v[i] = lexc.toDouble(_rowIndex[i] + col_start);
+ v[i] = lexc.toDouble(col_start + _rowIndex[i + s] );
}
return n;
} else if (_config._columnType == AsciiSourceConfig::Custom) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic