diff options
Diffstat (limited to 'generator/restriction_writer.cpp')
-rw-r--r-- | generator/restriction_writer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/generator/restriction_writer.cpp b/generator/restriction_writer.cpp index 27bba5e508..47821e963c 100644 --- a/generator/restriction_writer.cpp +++ b/generator/restriction_writer.cpp @@ -8,17 +8,17 @@ #include "base/logging.hpp" -#include "std/algorithm.hpp" -#include "std/fstream.hpp" -#include "std/string.hpp" -#include "std/utility.hpp" -#include "std/vector.hpp" +#include <algorithm> +#include <fstream> +#include <string> +#include <utility> +#include <vector> namespace { using namespace routing; -vector<pair<string, Restriction::Type>> const kRestrictionTypes = +std::vector<std::pair<std::string, Restriction::Type>> const kRestrictionTypes = {{"no_right_turn", Restriction::Type::No}, {"no_left_turn", Restriction::Type::No}, {"no_u_turn", Restriction::Type::No}, {"no_straight_on", Restriction::Type::No}, {"no_entry", Restriction::Type::No}, {"no_exit", Restriction::Type::No}, @@ -27,10 +27,10 @@ vector<pair<string, Restriction::Type>> const kRestrictionTypes = /// \brief Converts restriction type form string to RestrictionCollector::Type. /// \returns true if conversion was successful and false otherwise. -bool TagToType(string const & tag, Restriction::Type & type) +bool TagToType(std::string const & tag, Restriction::Type & type) { - auto const it = find_if(kRestrictionTypes.cbegin(), kRestrictionTypes.cend(), - [&tag](pair<string, Restriction::Type> const & v) { + auto const it = std::find_if(kRestrictionTypes.cbegin(), kRestrictionTypes.cend(), + [&tag](std::pair<std::string, Restriction::Type> const & v) { return v.first == tag; }); if (it == kRestrictionTypes.cend()) @@ -43,7 +43,7 @@ bool TagToType(string const & tag, Restriction::Type & type) namespace routing { -void RestrictionWriter::Open(string const & fullPath) +void RestrictionWriter::Open(std::string const & fullPath) { LOG(LINFO, ("Saving road restrictions in osm id terms to", fullPath)); m_stream.open(fullPath, std::ofstream::out); @@ -67,10 +67,10 @@ void RestrictionWriter::Write(RelationElement const & relationElement) return; // Unsupported restriction. For example line-line-line. // Extracting osm ids of lines and points of the restriction. - auto const findTag = [&relationElement](vector<pair<uint64_t, string>> const & members, - string const & tag) { - auto const it = find_if(members.cbegin(), members.cend(), - [&tag](pair<uint64_t, string> const & p) { return p.second == tag; }); + auto const findTag = [&relationElement](std::vector<std::pair<uint64_t, std::string>> const & members, + std::string const & tag) { + auto const it = std::find_if(members.cbegin(), members.cend(), + [&tag](std::pair<uint64_t, std::string> const & p) { return p.second == tag; }); return it; }; |