{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/112190795","pull_request_review_id":33485339,"id":112190795,"diff_hunk":"@@ -0,0 +1,70 @@\n+#pragma once\n+\n+#include \"indexer/classificator.hpp\"\n+#include \"indexer/feature_data.hpp\"\n+\n+#include <string>\n+#include <unordered_map>\n+#include <unordered_set>\n+#include <utility>\n+#include <vector>\n+\n+namespace ftypes\n+{\n+template <typename Container>\n+class Matcher\n+{\n+public:\n+  typename Container::const_iterator\n+  Find(feature::TypesHolder const & types) const\n+  {\n+    for (auto const t : types)\n+    {\n+      for (auto level = ftype::GetLevel(t); level; --level)\n+      {\n+        auto truncatedType = t;\n+        ftype::TruncValue(truncatedType, level);\n+        auto const it = m_mapping.find(truncatedType);\n+\n+        if (it != m_mapping.cend())\n+          return it;\n+      }\n+    }\n+\n+    return m_mapping.cend();\n+  }\n+\n+  bool IsValid(typename Container::const_iterator it) const\n+  {\n+    return it != m_mapping.cend();\n+  }\n+\n+  bool Contains(feature::TypesHolder const & types) const\n+  {\n+    return IsValid(Find(types));\n+  }\n+\n+  template<typename ... Args>\n+  void Append(std::vector<std::vector<std::string>> const & types, Args ... args)\n+  {\n+    for (auto const & type : types)\n+    {\n+#if defined(DEBUG)\n+      feature::TypesHolder holder;\n+      holder.Assign(classif().GetTypeByPath(type));\n+      ASSERT(Find(holder) == m_mapping.cend(), (\"This type already exists\", type));\n+#endif\n+      m_mapping.emplace(classif().GetTypeByPath(type), std::forward<Args>(args)...);","path":"indexer/ftypes_mapping.hpp","position":57,"original_position":57,"commit_id":"76b81e006327ea6520c94630c6e8a65728458d92","original_commit_id":"76b81e006327ea6520c94630c6e8a65728458d92","user":{"login":"milchakov","id":2606569,"avatar_url":"https://avatars2.githubusercontent.com/u/2606569?v=3","gravatar_id":"","url":"https://api.github.com/users/milchakov","html_url":"https://github.com/milchakov","followers_url":"https://api.github.com/users/milchakov/followers","following_url":"https://api.github.com/users/milchakov/following{/other_user}","gists_url":"https://api.github.com/users/milchakov/gists{/gist_id}","starred_url":"https://api.github.com/users/milchakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milchakov/subscriptions","organizations_url":"https://api.github.com/users/milchakov/orgs","repos_url":"https://api.github.com/users/milchakov/repos","events_url":"https://api.github.com/users/milchakov/events{/privacy}","received_events_url":"https://api.github.com/users/milchakov/received_events","type":"User","site_admin":false},"body":" Жаль, что прочитал твой коммент только сейчас.","created_at":"2017-04-19T12:44:42Z","updated_at":"2017-04-19T12:44:42Z","html_url":"https://github.com/mapsme/omim/pull/5862#discussion_r112190795","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/5862","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/112190795"},"html":{"href":"https://github.com/mapsme/omim/pull/5862#discussion_r112190795"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5862"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/5862","id":116377824,"html_url":"https://github.com/mapsme/omim/pull/5862","diff_url":"https://github.com/mapsme/omim/pull/5862.diff","patch_url":"https://github.com/mapsme/omim/pull/5862.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/5862","number":5862,"state":"open","locked":false,"title":"[DNM][core] Local ads place page buttons","user":{"login":"milchakov","id":2606569,"avatar_url":"https://avatars2.githubusercontent.com/u/2606569?v=3","gravatar_id":"","url":"https://api.github.com/users/milchakov","html_url":"https://github.com/milchakov","followers_url":"https://api.github.com/users/milchakov/followers","following_url":"https://api.github.com/users/milchakov/following{/other_user}","gists_url":"https://api.github.com/users/milchakov/gists{/gist_id}","starred_url":"https://api.github.com/users/milchakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milchakov/subscriptions","organizations_url":"https://api.github.com/users/milchakov/orgs","repos_url":"https://api.github.com/users/milchakov/repos","events_url":"https://api.github.com/users/milchakov/events{/privacy}","received_events_url":"https://api.github.com/users/milchakov/received_events","type":"User","site_admin":false},"body":"Не мержить пока нету нормального списка исключающих типов\r\nhttps://jira.mail.ru/browse/MAPSME-4312","created_at":"2017-04-18T17:18:02Z","updated_at":"2017-04-19T12:44:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7269d237b1fdb01190c1ed9471d4f0b702d887aa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/5862/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/5862/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/5862/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/76b81e006327ea6520c94630c6e8a65728458d92","head":{"label":"milchakov:geo_ads_place_page_core","ref":"geo_ads_place_page_core","sha":"76b81e006327ea6520c94630c6e8a65728458d92","user":{"login":"milchakov","id":2606569,"avatar_url":"https://avatars2.githubusercontent.com/u/2606569?v=3","gravatar_id":"","url":"https://api.github.com/users/milchakov","html_url":"https://github.com/milchakov","followers_url":"https://api.github.com/users/milchakov/followers","following_url":"https://api.github.com/users/milchakov/following{/other_user}","gists_url":"https://api.github.com/users/milchakov/gists{/gist_id}","starred_url":"https://api.github.com/users/milchakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milchakov/subscriptions","organizations_url":"https://api.github.com/users/milchakov/orgs","repos_url":"https://api.github.com/users/milchakov/repos","events_url":"https://api.github.com/users/milchakov/events{/privacy}","received_events_url":"https://api.github.com/users/milchakov/received_events","type":"User","site_admin":false},"repo":{"id":61498503,"name":"omim","full_name":"milchakov/omim","owner":{"login":"milchakov","id":2606569,"avatar_url":"https://avatars2.githubusercontent.com/u/2606569?v=3","gravatar_id":"","url":"https://api.github.com/users/milchakov","html_url":"https://github.com/milchakov","followers_url":"https://api.github.com/users/milchakov/followers","following_url":"https://api.github.com/users/milchakov/following{/other_user}","gists_url":"https://api.github.com/users/milchakov/gists{/gist_id}","starred_url":"https://api.github.com/users/milchakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milchakov/subscriptions","organizations_url":"https://api.github.com/users/milchakov/orgs","repos_url":"https://api.github.com/users/milchakov/repos","events_url":"https://api.github.com/users/milchakov/events{/privacy}","received_events_url":"https://api.github.com/users/milchakov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/milchakov/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/milchakov/omim","forks_url":"https://api.github.com/repos/milchakov/omim/forks","keys_url":"https://api.github.com/repos/milchakov/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/milchakov/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/milchakov/omim/teams","hooks_url":"https://api.github.com/repos/milchakov/omim/hooks","issue_events_url":"https://api.github.com/repos/milchakov/omim/issues/events{/number}","events_url":"https://api.github.com/repos/milchakov/omim/events","assignees_url":"https://api.github.com/repos/milchakov/omim/assignees{/user}","branches_url":"https://api.github.com/repos/milchakov/omim/branches{/branch}","tags_url":"https://api.github.com/repos/milchakov/omim/tags","blobs_url":"https://api.github.com/repos/milchakov/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/milchakov/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/milchakov/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/milchakov/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/milchakov/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/milchakov/omim/languages","stargazers_url":"https://api.github.com/repos/milchakov/omim/stargazers","contributors_url":"https://api.github.com/repos/milchakov/omim/contributors","subscribers_url":"https://api.github.com/repos/milchakov/omim/subscribers","subscription_url":"https://api.github.com/repos/milchakov/omim/subscription","commits_url":"https://api.github.com/repos/milchakov/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/milchakov/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/milchakov/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/milchakov/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/milchakov/omim/contents/{+path}","compare_url":"https://api.github.com/repos/milchakov/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/milchakov/omim/merges","archive_url":"https://api.github.com/repos/milchakov/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/milchakov/omim/downloads","issues_url":"https://api.github.com/repos/milchakov/omim/issues{/number}","pulls_url":"https://api.github.com/repos/milchakov/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/milchakov/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/milchakov/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/milchakov/omim/labels{/name}","releases_url":"https://api.github.com/repos/milchakov/omim/releases{/id}","deployments_url":"https://api.github.com/repos/milchakov/omim/deployments","created_at":"2016-06-19T20:16:05Z","updated_at":"2016-06-19T20:17:34Z","pushed_at":"2017-04-18T17:28:11Z","git_url":"git://github.com/milchakov/omim.git","ssh_url":"git@github.com:milchakov/omim.git","clone_url":"https://github.com/milchakov/omim.git","svn_url":"https://github.com/milchakov/omim","homepage":null,"size":3058509,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"0fa4258f7f21dd8c5724bac86851329a03f97caa","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2017-04-19T08:52:47Z","pushed_at":"2017-04-19T12:14:28Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":"","size":3071882,"stargazers_count":2218,"watchers_count":2218,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":450,"mirror_url":null,"open_issues_count":460,"forks":450,"open_issues":460,"watchers":2218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5862"},"html":{"href":"https://github.com/mapsme/omim/pull/5862"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/5862"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/5862/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5862/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/5862/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/76b81e006327ea6520c94630c6e8a65728458d92"}}}}
{"actor":{"display_login":"milchakov"}}