Support floats for speed value in traffic updates CSV (#6327)

This commit is contained in:
Siarhei Fedartsou
2022-08-30 15:34:46 +02:00
committed by GitHub
parent b17cbb4c47
commit 2cf957148b
5 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -34,10 +34,11 @@ namespace csv
SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
{
static const auto value_if_blank = std::numeric_limits<double>::quiet_NaN();
const qi::real_parser<double, qi::ureal_policies<double>> unsigned_double;
CSVFilesParser<Segment, SpeedSource> parser(
1,
qi::ulong_long >> ',' >> qi::ulong_long,
qi::uint_ >> -(',' >> (qi::double_ | qi::attr(value_if_blank))));
unsigned_double >> -(',' >> (qi::double_ | qi::attr(value_if_blank))));
// Check consistency of keys in the result lookup table
auto result = parser(paths);