From c52f59f5097fb2bfecff643be98c88f09de8d618 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Tue, 28 Jun 2016 16:54:48 +0300 Subject: [PATCH 1/3] [editor] Do not send empty stats requests --- editor/user_stats.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/user_stats.cpp b/editor/user_stats.cpp index 22b5eddec6..17e505dd9a 100644 --- a/editor/user_stats.cpp +++ b/editor/user_stats.cpp @@ -82,6 +82,9 @@ UserStatsLoader::UserStatsLoader() bool UserStatsLoader::Update(string const & userName) { + if (userName.empty()) + return false; + { lock_guard g(m_mutex); m_userName = userName; From f15b0c15132eadbd9142b7c0109d07ba89cb08e9 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Fri, 1 Jul 2016 16:40:48 +0300 Subject: [PATCH 2/3] Fix English grammar in changeset comments --- editor/changeset_wrapper.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/editor/changeset_wrapper.cpp b/editor/changeset_wrapper.cpp index 467d3dd6d6..22b6000b24 100644 --- a/editor/changeset_wrapper.cpp +++ b/editor/changeset_wrapper.cpp @@ -49,6 +49,9 @@ string GetTypeForFeature(XMLFeature const & node) return key; else if (key == "shop" || key == "office" || key == "building" || key == "entrance") return value + " " + key; // "convenience shop" + else if (!value.empty() && value.back() == 's') + // Remove 's' from the tail: "toilets" -> "toilet". + return value.substr(0, value.size() - 1); else return value; } @@ -301,10 +304,22 @@ string ChangesetWrapper::TypeCountToString(TTypeCount const & typeCount) // Format a count: "a shop" for single shop, "4 shops" for multiple. if (currentPair.second == 1) - ss << "a "; + { + switch (currentPair.first.front()) + { + case 'a': + case 'e': + case 'i': + case 'y': + case 'o': ss << "an"; break; + default: ss << "a"; + } + } else - ss << currentPair.second << ' '; - ss << currentPair.first; + { + ss << currentPair.second; + } + ss << ' ' << currentPair.first; if (currentPair.second > 1) ss << 's'; } From 491f12fe0f325a44097a75667a00bb618812dbd4 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Tue, 28 Jun 2016 19:34:04 +0300 Subject: [PATCH 3/3] [bicycle] Process cycleway:left/:right --- generator/osm2type.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index f8069dbe71..69adbb490e 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -529,6 +529,8 @@ namespace ftype { "bicycle", "!", [¶ms] { params.AddType(types.Get(CachedTypes::NOBICYCLE)); }}, { "bicycle", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }}, { "cycleway", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }}, + { "cycleway:right", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }}, + { "cycleway:left", "~", [¶ms] { params.AddType(types.Get(CachedTypes::YESBICYCLE)); }}, { "oneway:bicycle", "!", [¶ms] { params.AddType(types.Get(CachedTypes::BICYCLE_BIDIR)); }}, { "cycleway", "opposite", [¶ms] { params.AddType(types.Get(CachedTypes::BICYCLE_BIDIR)); }}, });