{"action":"created","issue":{"url":"https://api.github.com/repos/mapsme/omim/issues/7878","repository_url":"https://api.github.com/repos/mapsme/omim","labels_url":"https://api.github.com/repos/mapsme/omim/issues/7878/labels{/name}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/7878/comments","events_url":"https://api.github.com/repos/mapsme/omim/issues/7878/events","html_url":"https://github.com/mapsme/omim/pull/7878","id":284413497,"number":7878,"title":"[routing] Fix AStarAlgirithm::Params lifetime","user":{"login":"tatiana-kondakova","id":9213190,"avatar_url":"https://avatars3.githubusercontent.com/u/9213190?v=4","gravatar_id":"","url":"https://api.github.com/users/tatiana-kondakova","html_url":"https://github.com/tatiana-kondakova","followers_url":"https://api.github.com/users/tatiana-kondakova/followers","following_url":"https://api.github.com/users/tatiana-kondakova/following{/other_user}","gists_url":"https://api.github.com/users/tatiana-kondakova/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana-kondakova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana-kondakova/subscriptions","organizations_url":"https://api.github.com/users/tatiana-kondakova/orgs","repos_url":"https://api.github.com/users/tatiana-kondakova/repos","events_url":"https://api.github.com/users/tatiana-kondakova/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana-kondakova/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-25T07:09:56Z","updated_at":"2017-12-25T07:38:42Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/7878","html_url":"https://github.com/mapsme/omim/pull/7878","diff_url":"https://github.com/mapsme/omim/pull/7878.diff","patch_url":"https://github.com/mapsme/omim/pull/7878.patch"},"body":"Сломала в https://github.com/mapsme/omim/commit/86dc1ec066e30824ac9cdd76f8a037eaeec53b2c\r\n\r\nКонструктор Params как и AStar::FindPath/AStar::FindPathBidirectional/AStar::AdjustRoute принимал большинство параметров по константным ссылкам. Но раньше когда в тестах мы инициализировали их временными переменными (default constructed my::Cancellable, значения для вершин типа unsigned и т.п.) это было ок, так как время жизни временной переменной расширялось до окончания выражения, в кором был вызов функции.\r\n\r\nПосле создания params временная переменная стала жить до окончания конструктора. Исправляю это в этом PR. "},"comment":{"url":"https://api.github.com/repos/mapsme/omim/issues/comments/353842813","html_url":"https://github.com/mapsme/omim/pull/7878#issuecomment-353842813","issue_url":"https://api.github.com/repos/mapsme/omim/issues/7878","id":353842813,"user":{"login":"tatiana-kondakova","id":9213190,"avatar_url":"https://avatars3.githubusercontent.com/u/9213190?v=4","gravatar_id":"","url":"https://api.github.com/users/tatiana-kondakova","html_url":"https://github.com/tatiana-kondakova","followers_url":"https://api.github.com/users/tatiana-kondakova/followers","following_url":"https://api.github.com/users/tatiana-kondakova/following{/other_user}","gists_url":"https://api.github.com/users/tatiana-kondakova/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana-kondakova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana-kondakova/subscriptions","organizations_url":"https://api.github.com/users/tatiana-kondakova/orgs","repos_url":"https://api.github.com/users/tatiana-kondakova/repos","events_url":"https://api.github.com/users/tatiana-kondakova/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana-kondakova/received_events","type":"User","site_admin":false},"created_at":"2017-12-25T07:38:42Z","updated_at":"2017-12-25T07:38:42Z","author_association":"COLLABORATOR","body":"В качестве cancellable я тупо перестала передавать временные объекты(они передавались только в тестах), с prevRoute так делать не хочется.\r\nКак вариант можно вообще откатить коммит про Params, потому что код не кажется красивее того что было до (есть 3 места где стал красивее -- в IndexRouter::FindPath, т.к. там FindPath и FindPathBidirectional вызываются с аналогичным набором параметров и в тестах в тех же ситуациях, в остальных местах -- нет)."}}
{"actor":{"display_login":"tatiana-kondakova"}}