From c186e51a089b78dcae96702c2f01b88786cfd815 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Wed, 14 Sep 2016 20:27:17 +0200 Subject: [PATCH] Do Not Copy Lane Strings Into Fn --- src/extractor/extractor_callbacks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extractor/extractor_callbacks.cpp b/src/extractor/extractor_callbacks.cpp index ef76b7b1e..850d58d0c 100644 --- a/src/extractor/extractor_callbacks.cpp +++ b/src/extractor/extractor_callbacks.cpp @@ -142,7 +142,7 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti // FIXME this need to be moved into the profiles const guidance::RoadClassification road_classification = parsed_way.road_classification; - const auto laneStringToDescription = [](std::string lane_string) -> TurnLaneDescription { + const auto laneStringToDescription = [](const std::string &lane_string) -> TurnLaneDescription { if (lane_string.empty()) return {}; @@ -214,7 +214,7 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti // convert the lane description into an ID and, if necessary, remembr the description in the // description_map - const auto requestId = [&](std::string lane_string) { + const auto requestId = [&](const std::string &lane_string) { if (lane_string.empty()) return INVALID_LANE_DESCRIPTIONID; TurnLaneDescription lane_description = laneStringToDescription(std::move(lane_string));