# HG changeset patch # User František Kučera # Date 1554634178 -7200 # Node ID b0fe316e120153837bba2844a4f6f0d52b8c5b58 # Parent db029ce62ec53eb0e0a1762d0ad213347a8aa2ff string is the default type in recfile, so there is no need for %type metadata for string attributes and recfix will also stop complaining about: stdin:2: error: invalid type specification diff -r db029ce62ec5 -r b0fe316e1201 src/RecfileHandler.h --- a/src/RecfileHandler.h Sat Mar 30 16:14:41 2019 +0100 +++ b/src/RecfileHandler.h Sun Apr 07 12:49:38 2019 +0200 @@ -58,15 +58,15 @@ switch (type) { case TypeId::BOOLEAN: return "bool"; case TypeId::INTEGER: return "int"; - case TypeId::STRING: return ""; // TODO: string type? + case TypeId::STRING: return ""; default: throw RelpipeReaderException(L"Unsupported type – unable to convert to a Recfile type"); } } void writeAttributeMetadata(const handlers::AttributeMetadata& attribute) { // FIXME: escaping/filtering - // FIXME: translate to recfile types - output << "%type: " << convertor.to_bytes(attribute.getAttributeName()) << " " << toRecfileType(attribute.getTypeId()) << std::endl; + std::string recfileType = toRecfileType(attribute.getTypeId()); + if (recfileType.size()) output << "%type: " << convertor.to_bytes(attribute.getAttributeName()) << " " << recfileType << std::endl; } void writeSeparator() {