Support floats for speed value in traffic updates CSV
This commit is contained in:
parent
b907885a09
commit
3fde4c7b3e
@ -34,10 +34,11 @@ namespace csv
|
|||||||
SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
|
SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
|
||||||
{
|
{
|
||||||
static const auto value_if_blank = std::numeric_limits<double>::quiet_NaN();
|
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(
|
CSVFilesParser<Segment, SpeedSource> parser(
|
||||||
1,
|
1,
|
||||||
qi::ulong_long >> ',' >> qi::ulong_long,
|
qi::ulong_long >> ',' >> qi::ulong_long,
|
||||||
qi::double_ >> -(',' >> (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
|
// Check consistency of keys in the result lookup table
|
||||||
auto result = parser(paths);
|
auto result = parser(paths);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user