fix for dump

This commit is contained in:
john30
2016-06-26 16:35:38 +02:00
parent ae84214711
commit dc4dcdea8d
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -291,9 +291,7 @@ void SingleDataField::dump(ostream& output)
else if (m_partType == pt_slaveData)
output << "s";
output << FIELD_SEPARATOR;
if (!m_dataType->dump(output, m_length)) { // no divisor appended
output << FIELD_SEPARATOR; // no value list, no divisor
}
m_dataType->dump(output, m_length);
dumpString(output, m_unit);
dumpString(output, m_comment);
}
@@ -536,10 +534,6 @@ void ValueListDataField::dump(ostream& output)
if (!m_dataType->dump(output, m_length)) { // no divisor appended
bool first = true;
for (map<unsigned int, string>::iterator it = m_values.begin(); it != m_values.end(); it++) {
if (first)
first = false;
else
output << VALUE_SEPARATOR;
output << static_cast<unsigned>(it->first) << "=" << it->second;
}
} // TODO else does not fit into CSV format!