Address PR comments
This commit is contained in:
committed by
Patrick Niklaus
parent
4986f5ea2d
commit
94e2a8598d
+18
-13
@@ -5,19 +5,21 @@
|
||||
#include <boost/fusion/adapted/std_pair.hpp>
|
||||
#include <boost/fusion/include/adapt_adt.hpp>
|
||||
|
||||
// clang-format off
|
||||
BOOST_FUSION_ADAPT_STRUCT(osrm::updater::Segment,
|
||||
(decltype(osrm::updater::Segment::from),
|
||||
from)(decltype(osrm::updater::Segment::to), to))
|
||||
(decltype(osrm::updater::Segment::from), from)
|
||||
(decltype(osrm::updater::Segment::to), to))
|
||||
BOOST_FUSION_ADAPT_STRUCT(osrm::updater::SpeedSource,
|
||||
(decltype(osrm::updater::SpeedSource::speed),
|
||||
speed)(decltype(osrm::updater::SpeedSource::weight), weight))
|
||||
(decltype(osrm::updater::SpeedSource::speed), speed)
|
||||
(decltype(osrm::updater::SpeedSource::weight), weight))
|
||||
BOOST_FUSION_ADAPT_STRUCT(osrm::updater::Turn,
|
||||
(decltype(osrm::updater::Turn::from),
|
||||
from)(decltype(osrm::updater::Turn::via),
|
||||
via)(decltype(osrm::updater::Turn::to), to))
|
||||
(decltype(osrm::updater::Turn::from), from)
|
||||
(decltype(osrm::updater::Turn::via), via)
|
||||
(decltype(osrm::updater::Turn::to), to))
|
||||
BOOST_FUSION_ADAPT_STRUCT(osrm::updater::PenaltySource,
|
||||
(decltype(osrm::updater::PenaltySource::duration),
|
||||
duration)(decltype(osrm::updater::PenaltySource::weight), weight))
|
||||
(decltype(osrm::updater::PenaltySource::duration), duration)
|
||||
(decltype(osrm::updater::PenaltySource::weight), weight))
|
||||
// clang-format on
|
||||
namespace
|
||||
{
|
||||
namespace qi = boost::spirit::qi;
|
||||
@@ -31,16 +33,19 @@ namespace csv
|
||||
{
|
||||
SegmentLookupTable readSegmentValues(const std::vector<std::string> &paths)
|
||||
{
|
||||
return CSVFilesParser<Segment, SpeedSource>(
|
||||
1, qi::ulong_long >> ',' >> qi::ulong_long, qi::uint_ >> -(',' >> qi::double_))(paths);
|
||||
CSVFilesParser<Segment, SpeedSource> parser(
|
||||
1, qi::ulong_long >> ',' >> qi::ulong_long, qi::uint_ >> -(',' >> qi::double_));
|
||||
|
||||
return parser(paths);
|
||||
}
|
||||
|
||||
TurnLookupTable readTurnValues(const std::vector<std::string> &paths)
|
||||
{
|
||||
return CSVFilesParser<Turn, PenaltySource>(1,
|
||||
CSVFilesParser<Turn, PenaltySource> parser(1,
|
||||
qi::ulong_long >> ',' >> qi::ulong_long >> ',' >>
|
||||
qi::ulong_long,
|
||||
qi::double_ >> -(',' >> qi::double_))(paths);
|
||||
qi::double_ >> -(',' >> qi::double_));
|
||||
return parser(paths);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user