{"action":"created","comment":{"url":"https://api.github.com/repos/private-void/KK_Invaders/pulls/comments/82346167","pull_request_review_id":3260667,"id":82346167,"diff_hunk":"@@ -0,0 +1,375 @@\n+#include \"box2d.hpp\"\n+#include <iostream>\n+\n+//Конструктор с двумя координатами\n+Box2D::Box2D(float const x2, float const y2)\n+  : m_p2(x2, y2)\n+{\n+  CheckPoints();\n+}\n+\n+//Конструктор с четырьмя координатами\n+Box2D::Box2D(float const x1, float const y1, float const x2, float const y2)\n+  : m_p1(x1, y1)\n+  , m_p2(x2, y2)\n+{\n+  CheckPoints();\n+}\n+\n+//Конструктор с параметрами - точками.\n+Box2D::Box2D(Point2D p1, Point2D p2)\n+  : m_p1(p1)\n+  , m_p2(p2)\n+{\n+  CheckPoints();\n+}\n+\n+//Конструктор с параметром - точкой.\n+Box2D::Box2D(Point2D p1)\n+  : m_p2(p1)\n+{\n+  CheckPoints();\n+}\n+\n+//Конструктор с параметрами - точкой и двумя сторонами прямоугольника.\n+Box2D::Box2D(Point2D p1, float xSide, float ySide)\n+  : m_p1(p1)\n+  , m_p2(p1.x() + xSide, p1.y() + ySide)\n+{\n+  CheckPoints();\n+}\n+\n+//Конструктор копирования.\n+Box2D::Box2D(Box2D const & obj)\n+  : m_p1(obj.p1())\n+  , m_p2(obj.p2())\n+{\n+  CheckPoints();\n+}\n+\n+//Конструктор со списком инициализации из точек.\n+Box2D::Box2D(std::initializer_list<Point2D> const & lst)\n+{\n+  Point2D * arr[] = { & m_p1, & m_p2 };\n+  int const count = sizeof(arr) / sizeof(arr[0]);\n+  auto it = lst.begin();\n+\n+  for (int i = 0; i < count && it != lst.end(); i++, ++it)\n+  {\n+    *arr[i] = *it;\n+  }\n+  CheckPoints();\n+}\n+\n+//Конструктор со списком инициализации из координат точек.\n+Box2D::Box2D(std::initializer_list<float> const & lst)\n+{\n+  float * arr[] = { & m_p1.x(), & m_p1.y(), & m_p2.x(), & m_p2.y() };\n+  int const count = sizeof(arr) / sizeof(arr[0]);\n+  auto it = lst.begin();\n+\n+  for (int i = 0; i < count && it != lst.end(); i++, ++it)\n+  {\n+    *arr[i] = *it;\n+  }\n+  CheckPoints();\n+}\n+\n+// Вернуть правую верхнюю вершину.\n+Point2D & Box2D::p1()\n+{\n+  return m_p1;\n+}\n+\n+// Вернуть левую нижнюю вершину.\n+Point2D & Box2D::p2()\n+{\n+  return m_p2;\n+}\n+\n+// Вернуть правую верхнюю вершину.\n+Point2D const & Box2D::p1() const\n+{\n+  return m_p1;\n+}\n+\n+// Вернуть левую нижнюю вершину.\n+Point2D const & Box2D::p2() const\n+{\n+  return m_p2;\n+}\n+\n+// Вернуть левую верхнюю вершину.\n+Point2D const & Box2D::left_top_point() const\n+{\n+  return { m_p1.x(), m_p2.y() };","path":"src/box2d.cpp","position":105,"original_position":105,"commit_id":"5475e52d1a59b79fa6150f3b0b9fb30399094bd0","original_commit_id":"5475e52d1a59b79fa6150f3b0b9fb30399094bd0","user":{"login":"rokuz","id":5437220,"avatar_url":"https://avatars.githubusercontent.com/u/5437220?v=3","gravatar_id":"","url":"https://api.github.com/users/rokuz","html_url":"https://github.com/rokuz","followers_url":"https://api.github.com/users/rokuz/followers","following_url":"https://api.github.com/users/rokuz/following{/other_user}","gists_url":"https://api.github.com/users/rokuz/gists{/gist_id}","starred_url":"https://api.github.com/users/rokuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rokuz/subscriptions","organizations_url":"https://api.github.com/users/rokuz/orgs","repos_url":"https://api.github.com/users/rokuz/repos","events_url":"https://api.github.com/users/rokuz/events{/privacy}","received_events_url":"https://api.github.com/users/rokuz/received_events","type":"User","site_admin":false},"body":"Ошибка! Нельзя возвращать временный объект по ссылке","created_at":"2016-10-07T08:16:32Z","updated_at":"2016-10-07T08:16:32Z","html_url":"https://github.com/private-void/KK_Invaders/pull/1#discussion_r82346167","pull_request_url":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/private-void/KK_Invaders/pulls/comments/82346167"},"html":{"href":"https://github.com/private-void/KK_Invaders/pull/1#discussion_r82346167"},"pull_request":{"href":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1","id":88341962,"html_url":"https://github.com/private-void/KK_Invaders/pull/1","diff_url":"https://github.com/private-void/KK_Invaders/pull/1.diff","patch_url":"https://github.com/private-void/KK_Invaders/pull/1.patch","issue_url":"https://api.github.com/repos/private-void/KK_Invaders/issues/1","number":1,"state":"open","locked":false,"title":"v1.0","user":{"login":"Auerbah","id":22380704,"avatar_url":"https://avatars.githubusercontent.com/u/22380704?v=3","gravatar_id":"","url":"https://api.github.com/users/Auerbah","html_url":"https://github.com/Auerbah","followers_url":"https://api.github.com/users/Auerbah/followers","following_url":"https://api.github.com/users/Auerbah/following{/other_user}","gists_url":"https://api.github.com/users/Auerbah/gists{/gist_id}","starred_url":"https://api.github.com/users/Auerbah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Auerbah/subscriptions","organizations_url":"https://api.github.com/users/Auerbah/orgs","repos_url":"https://api.github.com/users/Auerbah/repos","events_url":"https://api.github.com/users/Auerbah/events{/privacy}","received_events_url":"https://api.github.com/users/Auerbah/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-06T21:11:54Z","updated_at":"2016-10-07T08:16:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1/commits","review_comments_url":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1/comments","review_comment_url":"https://api.github.com/repos/private-void/KK_Invaders/pulls/comments{/number}","comments_url":"https://api.github.com/repos/private-void/KK_Invaders/issues/1/comments","statuses_url":"https://api.github.com/repos/private-void/KK_Invaders/statuses/5475e52d1a59b79fa6150f3b0b9fb30399094bd0","head":{"label":"Auerbah:new_feature","ref":"new_feature","sha":"5475e52d1a59b79fa6150f3b0b9fb30399094bd0","user":{"login":"Auerbah","id":22380704,"avatar_url":"https://avatars.githubusercontent.com/u/22380704?v=3","gravatar_id":"","url":"https://api.github.com/users/Auerbah","html_url":"https://github.com/Auerbah","followers_url":"https://api.github.com/users/Auerbah/followers","following_url":"https://api.github.com/users/Auerbah/following{/other_user}","gists_url":"https://api.github.com/users/Auerbah/gists{/gist_id}","starred_url":"https://api.github.com/users/Auerbah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Auerbah/subscriptions","organizations_url":"https://api.github.com/users/Auerbah/orgs","repos_url":"https://api.github.com/users/Auerbah/repos","events_url":"https://api.github.com/users/Auerbah/events{/privacy}","received_events_url":"https://api.github.com/users/Auerbah/received_events","type":"User","site_admin":false},"repo":{"id":70191717,"name":"KK_Invaders","full_name":"Auerbah/KK_Invaders","owner":{"login":"Auerbah","id":22380704,"avatar_url":"https://avatars.githubusercontent.com/u/22380704?v=3","gravatar_id":"","url":"https://api.github.com/users/Auerbah","html_url":"https://github.com/Auerbah","followers_url":"https://api.github.com/users/Auerbah/followers","following_url":"https://api.github.com/users/Auerbah/following{/other_user}","gists_url":"https://api.github.com/users/Auerbah/gists{/gist_id}","starred_url":"https://api.github.com/users/Auerbah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Auerbah/subscriptions","organizations_url":"https://api.github.com/users/Auerbah/orgs","repos_url":"https://api.github.com/users/Auerbah/repos","events_url":"https://api.github.com/users/Auerbah/events{/privacy}","received_events_url":"https://api.github.com/users/Auerbah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Auerbah/KK_Invaders","description":"Курников Егор (https://github.com/private-void) и Квасный Алексей (https://github.com/Auerbah)","fork":true,"url":"https://api.github.com/repos/Auerbah/KK_Invaders","forks_url":"https://api.github.com/repos/Auerbah/KK_Invaders/forks","keys_url":"https://api.github.com/repos/Auerbah/KK_Invaders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Auerbah/KK_Invaders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Auerbah/KK_Invaders/teams","hooks_url":"https://api.github.com/repos/Auerbah/KK_Invaders/hooks","issue_events_url":"https://api.github.com/repos/Auerbah/KK_Invaders/issues/events{/number}","events_url":"https://api.github.com/repos/Auerbah/KK_Invaders/events","assignees_url":"https://api.github.com/repos/Auerbah/KK_Invaders/assignees{/user}","branches_url":"https://api.github.com/repos/Auerbah/KK_Invaders/branches{/branch}","tags_url":"https://api.github.com/repos/Auerbah/KK_Invaders/tags","blobs_url":"https://api.github.com/repos/Auerbah/KK_Invaders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Auerbah/KK_Invaders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Auerbah/KK_Invaders/git/refs{/sha}","trees_url":"https://api.github.com/repos/Auerbah/KK_Invaders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Auerbah/KK_Invaders/statuses/{sha}","languages_url":"https://api.github.com/repos/Auerbah/KK_Invaders/languages","stargazers_url":"https://api.github.com/repos/Auerbah/KK_Invaders/stargazers","contributors_url":"https://api.github.com/repos/Auerbah/KK_Invaders/contributors","subscribers_url":"https://api.github.com/repos/Auerbah/KK_Invaders/subscribers","subscription_url":"https://api.github.com/repos/Auerbah/KK_Invaders/subscription","commits_url":"https://api.github.com/repos/Auerbah/KK_Invaders/commits{/sha}","git_commits_url":"https://api.github.com/repos/Auerbah/KK_Invaders/git/commits{/sha}","comments_url":"https://api.github.com/repos/Auerbah/KK_Invaders/comments{/number}","issue_comment_url":"https://api.github.com/repos/Auerbah/KK_Invaders/issues/comments{/number}","contents_url":"https://api.github.com/repos/Auerbah/KK_Invaders/contents/{+path}","compare_url":"https://api.github.com/repos/Auerbah/KK_Invaders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Auerbah/KK_Invaders/merges","archive_url":"https://api.github.com/repos/Auerbah/KK_Invaders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Auerbah/KK_Invaders/downloads","issues_url":"https://api.github.com/repos/Auerbah/KK_Invaders/issues{/number}","pulls_url":"https://api.github.com/repos/Auerbah/KK_Invaders/pulls{/number}","milestones_url":"https://api.github.com/repos/Auerbah/KK_Invaders/milestones{/number}","notifications_url":"https://api.github.com/repos/Auerbah/KK_Invaders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Auerbah/KK_Invaders/labels{/name}","releases_url":"https://api.github.com/repos/Auerbah/KK_Invaders/releases{/id}","deployments_url":"https://api.github.com/repos/Auerbah/KK_Invaders/deployments","created_at":"2016-10-06T20:47:19Z","updated_at":"2016-10-01T11:28:57Z","pushed_at":"2016-10-06T21:08:14Z","git_url":"git://github.com/Auerbah/KK_Invaders.git","ssh_url":"git@github.com:Auerbah/KK_Invaders.git","clone_url":"https://github.com/Auerbah/KK_Invaders.git","svn_url":"https://github.com/Auerbah/KK_Invaders","homepage":"","size":12,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":"private-void:master","ref":"master","sha":"58aeb7504c7c4ed8c148546b825b8f39d311838c","user":{"login":"private-void","id":22380602,"avatar_url":"https://avatars.githubusercontent.com/u/22380602?v=3","gravatar_id":"","url":"https://api.github.com/users/private-void","html_url":"https://github.com/private-void","followers_url":"https://api.github.com/users/private-void/followers","following_url":"https://api.github.com/users/private-void/following{/other_user}","gists_url":"https://api.github.com/users/private-void/gists{/gist_id}","starred_url":"https://api.github.com/users/private-void/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/private-void/subscriptions","organizations_url":"https://api.github.com/users/private-void/orgs","repos_url":"https://api.github.com/users/private-void/repos","events_url":"https://api.github.com/users/private-void/events{/privacy}","received_events_url":"https://api.github.com/users/private-void/received_events","type":"User","site_admin":false},"repo":{"id":68962113,"name":"KK_Invaders","full_name":"private-void/KK_Invaders","owner":{"login":"private-void","id":22380602,"avatar_url":"https://avatars.githubusercontent.com/u/22380602?v=3","gravatar_id":"","url":"https://api.github.com/users/private-void","html_url":"https://github.com/private-void","followers_url":"https://api.github.com/users/private-void/followers","following_url":"https://api.github.com/users/private-void/following{/other_user}","gists_url":"https://api.github.com/users/private-void/gists{/gist_id}","starred_url":"https://api.github.com/users/private-void/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/private-void/subscriptions","organizations_url":"https://api.github.com/users/private-void/orgs","repos_url":"https://api.github.com/users/private-void/repos","events_url":"https://api.github.com/users/private-void/events{/privacy}","received_events_url":"https://api.github.com/users/private-void/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/private-void/KK_Invaders","description":"Курников Егор (https://github.com/private-void) и Квасный Алексей (https://github.com/Auerbah)","fork":false,"url":"https://api.github.com/repos/private-void/KK_Invaders","forks_url":"https://api.github.com/repos/private-void/KK_Invaders/forks","keys_url":"https://api.github.com/repos/private-void/KK_Invaders/keys{/key_id}","collaborators_url":"https://api.github.com/repos/private-void/KK_Invaders/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/private-void/KK_Invaders/teams","hooks_url":"https://api.github.com/repos/private-void/KK_Invaders/hooks","issue_events_url":"https://api.github.com/repos/private-void/KK_Invaders/issues/events{/number}","events_url":"https://api.github.com/repos/private-void/KK_Invaders/events","assignees_url":"https://api.github.com/repos/private-void/KK_Invaders/assignees{/user}","branches_url":"https://api.github.com/repos/private-void/KK_Invaders/branches{/branch}","tags_url":"https://api.github.com/repos/private-void/KK_Invaders/tags","blobs_url":"https://api.github.com/repos/private-void/KK_Invaders/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/private-void/KK_Invaders/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/private-void/KK_Invaders/git/refs{/sha}","trees_url":"https://api.github.com/repos/private-void/KK_Invaders/git/trees{/sha}","statuses_url":"https://api.github.com/repos/private-void/KK_Invaders/statuses/{sha}","languages_url":"https://api.github.com/repos/private-void/KK_Invaders/languages","stargazers_url":"https://api.github.com/repos/private-void/KK_Invaders/stargazers","contributors_url":"https://api.github.com/repos/private-void/KK_Invaders/contributors","subscribers_url":"https://api.github.com/repos/private-void/KK_Invaders/subscribers","subscription_url":"https://api.github.com/repos/private-void/KK_Invaders/subscription","commits_url":"https://api.github.com/repos/private-void/KK_Invaders/commits{/sha}","git_commits_url":"https://api.github.com/repos/private-void/KK_Invaders/git/commits{/sha}","comments_url":"https://api.github.com/repos/private-void/KK_Invaders/comments{/number}","issue_comment_url":"https://api.github.com/repos/private-void/KK_Invaders/issues/comments{/number}","contents_url":"https://api.github.com/repos/private-void/KK_Invaders/contents/{+path}","compare_url":"https://api.github.com/repos/private-void/KK_Invaders/compare/{base}...{head}","merges_url":"https://api.github.com/repos/private-void/KK_Invaders/merges","archive_url":"https://api.github.com/repos/private-void/KK_Invaders/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/private-void/KK_Invaders/downloads","issues_url":"https://api.github.com/repos/private-void/KK_Invaders/issues{/number}","pulls_url":"https://api.github.com/repos/private-void/KK_Invaders/pulls{/number}","milestones_url":"https://api.github.com/repos/private-void/KK_Invaders/milestones{/number}","notifications_url":"https://api.github.com/repos/private-void/KK_Invaders/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/private-void/KK_Invaders/labels{/name}","releases_url":"https://api.github.com/repos/private-void/KK_Invaders/releases{/id}","deployments_url":"https://api.github.com/repos/private-void/KK_Invaders/deployments","created_at":"2016-09-22T21:04:47Z","updated_at":"2016-10-07T07:47:38Z","pushed_at":"2016-10-06T21:35:43Z","git_url":"git://github.com/private-void/KK_Invaders.git","ssh_url":"git@github.com:private-void/KK_Invaders.git","clone_url":"https://github.com/private-void/KK_Invaders.git","svn_url":"https://github.com/private-void/KK_Invaders","homepage":"","size":1049,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1"},"html":{"href":"https://github.com/private-void/KK_Invaders/pull/1"},"issue":{"href":"https://api.github.com/repos/private-void/KK_Invaders/issues/1"},"comments":{"href":"https://api.github.com/repos/private-void/KK_Invaders/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/private-void/KK_Invaders/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/private-void/KK_Invaders/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/private-void/KK_Invaders/statuses/5475e52d1a59b79fa6150f3b0b9fb30399094bd0"}}}}
{"actor":{"display_login":"rokuz"}}