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

George Staikos staikos at kde.org
Wed Apr 13 08:14:09 CEST 2005


CVS commit by staikos: 

remove warnings, and don't clear the fieldlist because if the field list changed
then the row index is almost certainly wrong anyway, and we don't really support
such changing files


  M +3 -5      ascii.cpp   1.49


--- kdeextragear-2/kst/kst/datasources/ascii/ascii.cpp  #1.48:1.49
@@ -155,6 +155,4 @@ KstObject::UpdateType AsciiSource::updat
   }
 
-  _fields.clear(); // FIXME: only clear if the fields have changed
-
   if (file.exists()) {
     if (uint(_byteLength) != file.size() || !_valid) {
@@ -237,5 +235,5 @@ int AsciiSource::readField(double *v, co
 
   QStringList fieldList = this->fieldList();
-  int col = 0;
+  uint col = 0;
   for (QStringList::ConstIterator i = fieldList.begin(); i != fieldList.end(); ++i) {
     if (*i == field) {
@@ -280,5 +278,5 @@ int AsciiSource::readField(double *v, co
     for (int i = 0; i < n; i++, s++) {
       bool incol = false;
-      int i_col = 0;
+      uint i_col = 0;
       v[i] = 0.0;
       for (int ch = _rowIndex[s] - bufstart; ch < bufread; ++ch) {
@@ -304,5 +302,5 @@ int AsciiSource::readField(double *v, co
     for (int i = 0; i < n; i++, s++) {
       bool incol = false;
-      int i_col = 0;
+      uint i_col = 0;
       v[i] = 0.0;
       for (int ch = _rowIndex[s] - bufstart; ch < bufread; ++ch) {




More information about the Kst mailing list