fix warnings in compilation on clang
This commit is contained in:
parent
a516245c94
commit
4d864b8267
@ -2,15 +2,15 @@
|
||||
#define ENGINE_API_ROUTE_HPP
|
||||
|
||||
#include "engine/api/base_api.hpp"
|
||||
#include "engine/api/route_parameters.hpp"
|
||||
#include "engine/api/json_factory.hpp"
|
||||
#include "engine/api/route_parameters.hpp"
|
||||
|
||||
#include "engine/datafacade/datafacade_base.hpp"
|
||||
|
||||
#include "engine/guidance/assemble_leg.hpp"
|
||||
#include "engine/guidance/assemble_route.hpp"
|
||||
#include "engine/guidance/assemble_geometry.hpp"
|
||||
#include "engine/guidance/assemble_leg.hpp"
|
||||
#include "engine/guidance/assemble_overview.hpp"
|
||||
#include "engine/guidance/assemble_route.hpp"
|
||||
#include "engine/guidance/assemble_steps.hpp"
|
||||
#include "engine/guidance/post_processing.hpp"
|
||||
|
||||
@ -92,8 +92,8 @@ class RouteAPI : public BaseAPI
|
||||
|
||||
auto leg_geometry = guidance::assembleGeometry(
|
||||
BaseAPI::facade, path_data, phantoms.source_phantom, phantoms.target_phantom);
|
||||
auto leg = guidance::assembleLeg(BaseAPI::facade, path_data, leg_geometry,
|
||||
phantoms.source_phantom, phantoms.target_phantom, reversed_target);
|
||||
auto leg = guidance::assembleLeg(path_data, leg_geometry, phantoms.source_phantom,
|
||||
phantoms.target_phantom, reversed_target);
|
||||
|
||||
if (parameters.steps)
|
||||
{
|
||||
@ -160,8 +160,7 @@ class RouteAPI : public BaseAPI
|
||||
auto &leg_geometry = leg_geometries[idx];
|
||||
std::transform(
|
||||
legs[idx].steps.begin(), legs[idx].steps.end(), std::back_inserter(step_geometries),
|
||||
[this, &leg_geometry](const guidance::RouteStep &step)
|
||||
{
|
||||
[this, &leg_geometry](const guidance::RouteStep &step) {
|
||||
if (parameters.geometries == RouteParameters::GeometriesType::Polyline)
|
||||
{
|
||||
return static_cast<util::json::Value>(
|
||||
|
@ -1,20 +1,20 @@
|
||||
#ifndef ENGINE_GUIDANCE_ASSEMBLE_LEG_HPP_
|
||||
#define ENGINE_GUIDANCE_ASSEMBLE_LEG_HPP_
|
||||
|
||||
#include "engine/guidance/leg_geometry.hpp"
|
||||
#include "engine/guidance/route_leg.hpp"
|
||||
#include "engine/guidance/route_step.hpp"
|
||||
#include "engine/guidance/leg_geometry.hpp"
|
||||
#include "engine/internal_route_result.hpp"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <numeric>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <numeric>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
@ -23,13 +23,11 @@ namespace engine
|
||||
namespace guidance
|
||||
{
|
||||
|
||||
template <typename DataFacadeT>
|
||||
RouteLeg assembleLeg(const DataFacadeT &facade,
|
||||
const std::vector<PathData> &route_data,
|
||||
const LegGeometry &leg_geometry,
|
||||
const PhantomNode &source_node,
|
||||
const PhantomNode &target_node,
|
||||
const bool target_traversed_in_reverse)
|
||||
inline RouteLeg assembleLeg(const std::vector<PathData> &route_data,
|
||||
const LegGeometry &leg_geometry,
|
||||
const PhantomNode &source_node,
|
||||
const PhantomNode &target_node,
|
||||
const bool target_traversed_in_reverse)
|
||||
{
|
||||
const auto target_duration =
|
||||
(target_traversed_in_reverse ? target_node.reverse_weight : target_node.forward_weight) /
|
||||
@ -38,8 +36,7 @@ RouteLeg assembleLeg(const DataFacadeT &facade,
|
||||
auto distance = std::accumulate(leg_geometry.segment_distances.begin(),
|
||||
leg_geometry.segment_distances.end(), 0.);
|
||||
auto duration = std::accumulate(route_data.begin(), route_data.end(), 0.,
|
||||
[](const double sum, const PathData &data)
|
||||
{
|
||||
[](const double sum, const PathData &data) {
|
||||
return sum + data.duration_until_turn;
|
||||
}) /
|
||||
10.;
|
||||
|
@ -23,7 +23,7 @@ std::vector<util::Coordinate> douglasPeucker(std::vector<util::Coordinate>::cons
|
||||
BOOST_ASSERT_MSG(zoom_level < detail::DOUGLAS_PEUCKER_THRESHOLDS_SIZE,
|
||||
"unsupported zoom level");
|
||||
|
||||
const auto size = std::distance(begin, end);
|
||||
const std::size_t size = std::distance(begin, end);
|
||||
if (size < 2)
|
||||
{
|
||||
return {};
|
||||
|
Loading…
Reference in New Issue
Block a user