{"action":"created","comment":{"url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/comments/93861755","pull_request_review_id":14394927,"id":93861755,"diff_hunk":"@@ -7,80 +7,183 @@\n \n #include \"tbitfield.h\"\n \n-TBitField::TBitField(int len)\n-{\n+TBitField::TBitField(int len) :BitLen(len){\n+\tif (len > 0){\n+\t\tMemLen = (len +( sizeof(TELEM)* 8 -1) ) >> 4;\n+\t\tpMem = new TELEM[MemLen];\n+\t\tif (pMem != NULL)\n+\t\tfor (int i = 0; i < MemLen; i++)\n+\t\t\tpMem[i] = 0;\n+\t}\n+\telse throw 1;\n }\n \n-TBitField::TBitField(const TBitField &bf) // конструктор копирования\n+TBitField::TBitField(const TBitField &bf) // конструктор копирования \n {\n+\tBitLen = bf.BitLen;\n+\tMemLen = bf.MemLen;\n+\tpMem = new TELEM[MemLen];\n+\tif (pMem!=NULL)\n+\tfor (int i = 0; i < MemLen; ++i)\n+\t\tpMem[i] = bf.pMem[i];\n }\n \n-TBitField::~TBitField()\n-{\n-}\n+TBitField::~TBitField(){\n+\tdelete pMem;\n+\tpMem = NULL;\n+\t}\n \n int TBitField::GetMemIndex(const int n) const // индекс Мем для бита n\n {\n+\treturn n >> 4;\n }\n \n TELEM TBitField::GetMemMask(const int n) const // битовая маска для бита n\n {\n+\treturn 1 << (n & (sizeof(TELEM)*8 -1));\n }\n \n // доступ к битам битового поля\n \n int TBitField::GetLength(void) const // получить длину (к-во битов)\n {\n-  return 0;\n+\treturn BitLen;\n }\n \n void TBitField::SetBit(const int n) // установить бит\n {\n+\tif ((n >= 0) && (n<BitLen)) {\n+\t\tif ((n > -1) && (n < BitLen))","path":"src/tbitfield.cpp","position":57,"original_position":57,"commit_id":"c0143554ecf0094c4a3cf9c4415bf238caa360e2","original_commit_id":"c0143554ecf0094c4a3cf9c4415bf238caa360e2","user":{"login":"alexey-sidnev","id":14936294,"avatar_url":"https://avatars.githubusercontent.com/u/14936294?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-sidnev","html_url":"https://github.com/alexey-sidnev","followers_url":"https://api.github.com/users/alexey-sidnev/followers","following_url":"https://api.github.com/users/alexey-sidnev/following{/other_user}","gists_url":"https://api.github.com/users/alexey-sidnev/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-sidnev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-sidnev/subscriptions","organizations_url":"https://api.github.com/users/alexey-sidnev/orgs","repos_url":"https://api.github.com/users/alexey-sidnev/repos","events_url":"https://api.github.com/users/alexey-sidnev/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-sidnev/received_events","type":"User","site_admin":false},"body":"Зачем сначала проверять `n >= 0` а потом `n > -1`?","created_at":"2016-12-26T11:37:39Z","updated_at":"2016-12-26T11:42:30Z","html_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set/pull/1#discussion_r93861755","pull_request_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/comments/93861755"},"html":{"href":"https://github.com/AnastasiaaSenina/mp2-lab1-set/pull/1#discussion_r93861755"},"pull_request":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1","id":89807546,"html_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set/pull/1","diff_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set/pull/1.diff","patch_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set/pull/1.patch","issue_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/1","number":1,"state":"open","locked":false,"title":"added implementation and tests","user":{"login":"AnastasiaaSenina","id":22386452,"avatar_url":"https://avatars.githubusercontent.com/u/22386452?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaaSenina","html_url":"https://github.com/AnastasiaaSenina","followers_url":"https://api.github.com/users/AnastasiaaSenina/followers","following_url":"https://api.github.com/users/AnastasiaaSenina/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaaSenina/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaaSenina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaaSenina/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaaSenina/orgs","repos_url":"https://api.github.com/users/AnastasiaaSenina/repos","events_url":"https://api.github.com/users/AnastasiaaSenina/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaaSenina/received_events","type":"User","site_admin":false},"body":"@alexey-sidnev The first lab work done.\n","created_at":"2016-10-18T12:45:42Z","updated_at":"2016-12-26T11:42:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"661bf2d9f4b368fee4922f6410f85c4ae3b48f97","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1/commits","review_comments_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1/comments","review_comment_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/1/comments","statuses_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/statuses/c0143554ecf0094c4a3cf9c4415bf238caa360e2","head":{"label":"AnastasiaaSenina:develop","ref":"develop","sha":"c0143554ecf0094c4a3cf9c4415bf238caa360e2","user":{"login":"AnastasiaaSenina","id":22386452,"avatar_url":"https://avatars.githubusercontent.com/u/22386452?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaaSenina","html_url":"https://github.com/AnastasiaaSenina","followers_url":"https://api.github.com/users/AnastasiaaSenina/followers","following_url":"https://api.github.com/users/AnastasiaaSenina/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaaSenina/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaaSenina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaaSenina/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaaSenina/orgs","repos_url":"https://api.github.com/users/AnastasiaaSenina/repos","events_url":"https://api.github.com/users/AnastasiaaSenina/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaaSenina/received_events","type":"User","site_admin":false},"repo":{"id":70711847,"name":"mp2-lab1-set","full_name":"AnastasiaaSenina/mp2-lab1-set","owner":{"login":"AnastasiaaSenina","id":22386452,"avatar_url":"https://avatars.githubusercontent.com/u/22386452?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaaSenina","html_url":"https://github.com/AnastasiaaSenina","followers_url":"https://api.github.com/users/AnastasiaaSenina/followers","following_url":"https://api.github.com/users/AnastasiaaSenina/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaaSenina/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaaSenina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaaSenina/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaaSenina/orgs","repos_url":"https://api.github.com/users/AnastasiaaSenina/repos","events_url":"https://api.github.com/users/AnastasiaaSenina/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaaSenina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set","description":"Проект-шаблон для выполнения первого практического задания по курсу МП2","fork":true,"url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set","forks_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/forks","keys_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/teams","hooks_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/hooks","issue_events_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/events{/number}","events_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/events","assignees_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/assignees{/user}","branches_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/branches{/branch}","tags_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/tags","blobs_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/statuses/{sha}","languages_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/languages","stargazers_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/stargazers","contributors_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/contributors","subscribers_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/subscribers","subscription_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/subscription","commits_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/contents/{+path}","compare_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/merges","archive_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/downloads","issues_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues{/number}","pulls_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls{/number}","milestones_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/milestones{/number}","notifications_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/labels{/name}","releases_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/releases{/id}","deployments_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/deployments","created_at":"2016-10-12T15:07:31Z","updated_at":"2016-10-12T15:07:32Z","pushed_at":"2016-10-18T12:45:42Z","git_url":"git://github.com/AnastasiaaSenina/mp2-lab1-set.git","ssh_url":"git@github.com:AnastasiaaSenina/mp2-lab1-set.git","clone_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set.git","svn_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set","homepage":"http://www.software.unn.ru/?doc=507","size":7155,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"AnastasiaaSenina:master","ref":"master","sha":"98f7199638a686a24cb62d38e460d4f153d3a177","user":{"login":"AnastasiaaSenina","id":22386452,"avatar_url":"https://avatars.githubusercontent.com/u/22386452?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaaSenina","html_url":"https://github.com/AnastasiaaSenina","followers_url":"https://api.github.com/users/AnastasiaaSenina/followers","following_url":"https://api.github.com/users/AnastasiaaSenina/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaaSenina/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaaSenina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaaSenina/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaaSenina/orgs","repos_url":"https://api.github.com/users/AnastasiaaSenina/repos","events_url":"https://api.github.com/users/AnastasiaaSenina/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaaSenina/received_events","type":"User","site_admin":false},"repo":{"id":70711847,"name":"mp2-lab1-set","full_name":"AnastasiaaSenina/mp2-lab1-set","owner":{"login":"AnastasiaaSenina","id":22386452,"avatar_url":"https://avatars.githubusercontent.com/u/22386452?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaaSenina","html_url":"https://github.com/AnastasiaaSenina","followers_url":"https://api.github.com/users/AnastasiaaSenina/followers","following_url":"https://api.github.com/users/AnastasiaaSenina/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaaSenina/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaaSenina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaaSenina/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaaSenina/orgs","repos_url":"https://api.github.com/users/AnastasiaaSenina/repos","events_url":"https://api.github.com/users/AnastasiaaSenina/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaaSenina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set","description":"Проект-шаблон для выполнения первого практического задания по курсу МП2","fork":true,"url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set","forks_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/forks","keys_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/teams","hooks_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/hooks","issue_events_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/events{/number}","events_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/events","assignees_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/assignees{/user}","branches_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/branches{/branch}","tags_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/tags","blobs_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/statuses/{sha}","languages_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/languages","stargazers_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/stargazers","contributors_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/contributors","subscribers_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/subscribers","subscription_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/subscription","commits_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/contents/{+path}","compare_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/merges","archive_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/downloads","issues_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues{/number}","pulls_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls{/number}","milestones_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/milestones{/number}","notifications_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/labels{/name}","releases_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/releases{/id}","deployments_url":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/deployments","created_at":"2016-10-12T15:07:31Z","updated_at":"2016-10-12T15:07:32Z","pushed_at":"2016-10-18T12:45:42Z","git_url":"git://github.com/AnastasiaaSenina/mp2-lab1-set.git","ssh_url":"git@github.com:AnastasiaaSenina/mp2-lab1-set.git","clone_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set.git","svn_url":"https://github.com/AnastasiaaSenina/mp2-lab1-set","homepage":"http://www.software.unn.ru/?doc=507","size":7155,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1"},"html":{"href":"https://github.com/AnastasiaaSenina/mp2-lab1-set/pull/1"},"issue":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/1"},"comments":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/AnastasiaaSenina/mp2-lab1-set/statuses/c0143554ecf0094c4a3cf9c4415bf238caa360e2"}}}}
{"actor":{"display_login":"alexey-sidnev"}}