Mercurial > hg > svcore
diff data/fileio/CSVFileReader.cpp @ 1428:87ae75da6527
Convert some cerrs to SVCERRs. Apart from anything else, this makes MSVC2017 happy
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 14:43:40 +0000 |
parents | 815f82508f96 |
children | 48e9f538e6e9 |
line wrap: on
line diff
--- a/data/fileio/CSVFileReader.cpp Mon Dec 11 09:28:40 2017 +0000 +++ b/data/fileio/CSVFileReader.cpp Thu Mar 01 14:43:40 2018 +0000 @@ -34,6 +34,7 @@ #include <iostream> #include <map> +#include <string> using namespace std; @@ -137,12 +138,12 @@ if (!ok) { if (m_warnings < warnLimit) { - cerr << "WARNING: CSVFileReader::load: " + SVCERR << "WARNING: CSVFileReader::load: " << "Bad time format (\"" << s << "\") in data line " << lineno+1 << endl; } else if (m_warnings == warnLimit) { - cerr << "WARNING: Too many warnings" << endl; + SVCERR << "WARNING: Too many warnings" << endl; } ++m_warnings; } @@ -384,15 +385,15 @@ if (!ok) { if (warnings < warnLimit) { - cerr << "WARNING: CSVFileReader::load: " + SVCERR << "WARNING: CSVFileReader::load: " << "Non-numeric value \"" << list[i] << "\" in data line " << lineno+1 << ":" << endl; - cerr << line << endl; + SVCERR << line << endl; ++warnings; } else if (warnings == warnLimit) { -// cerr << "WARNING: Too many warnings" << endl; +// SVCERR << "WARNING: Too many warnings" << endl; } } } @@ -426,11 +427,11 @@ for (map<int, map<QString, float> >::iterator i = countLabelValueMap.end(); i != countLabelValueMap.begin(); ) { --i; - cerr << "count -> " << i->first << endl; + SVCERR << "count -> " << i->first << endl; for (map<QString, float>::iterator j = i->second.begin(); j != i->second.end(); ++j) { j->second = v; - cerr << "label -> " << j->first << ", value " << v << endl; + SVCERR << "label -> " << j->first << ", value " << v << endl; v = v + 1.f; } } @@ -443,7 +444,7 @@ RegionModel::Point p(*i); int count = labelCountMap[p.label]; v = countLabelValueMap[count][p.label]; - cerr << "mapping from label \"" << p.label << "\" (count " << count << ") to value " << v << endl; + // SVCERR << "mapping from label \"" << p.label << "\" (count " << count << ") to value " << v << endl; RegionModel::Point pp(p.frame, v, p.duration, p.label); pointMap[p] = pp; }