{"action":"created","issue":{"url":"https://api.github.com/repos/PLaGInc/Lab_3_q2/issues/1","labels_url":"https://api.github.com/repos/PLaGInc/Lab_3_q2/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/PLaGInc/Lab_3_q2/issues/1/comments","events_url":"https://api.github.com/repos/PLaGInc/Lab_3_q2/issues/1/events","html_url":"https://github.com/PLaGInc/Lab_3_q2/issues/1","id":73415757,"number":1,"title":"Замечания по классу \"Прямоугольник\"","user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-05T19:57:04Z","updated_at":"2015-05-05T20:00:42Z","closed_at":null,"body":"Вместо кучи однотипных проверок, вроде:\r\n```c++\r\n\tBOOST_CHECK(rect.GetLeft() == 2);\r\n\tBOOST_CHECK(rect.GetTop() == 2);\r\n\tBOOST_CHECK(rect.GetRight() == 5);\r\n\tBOOST_CHECK(rect.GetBottom() == 6);\r\n```\r\nлучше сделать отдельную функцию \r\n```c++\r\nbool RectanglesAreEqual(CRectangle const& rect1, CRectangle const& rect2)\r\n```\r\nи использовать ее:\r\n```c++\r\nBOOST_CHECK(RectanglesAreEqual(rect, CRectangle(2, 2, 3, 4)));\r\n```"},"comment":{"url":"https://api.github.com/repos/PLaGInc/Lab_3_q2/issues/comments/99203648","html_url":"https://github.com/PLaGInc/Lab_3_q2/issues/1#issuecomment-99203648","issue_url":"https://api.github.com/repos/PLaGInc/Lab_3_q2/issues/1","id":99203648,"user":{"login":"alexey-malov","id":6040682,"avatar_url":"https://avatars.githubusercontent.com/u/6040682?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey-malov","html_url":"https://github.com/alexey-malov","followers_url":"https://api.github.com/users/alexey-malov/followers","following_url":"https://api.github.com/users/alexey-malov/following{/other_user}","gists_url":"https://api.github.com/users/alexey-malov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey-malov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey-malov/subscriptions","organizations_url":"https://api.github.com/users/alexey-malov/orgs","repos_url":"https://api.github.com/users/alexey-malov/repos","events_url":"https://api.github.com/users/alexey-malov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey-malov/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T20:00:42Z","updated_at":"2015-05-05T20:00:42Z","body":"```c++\r\nbool ReadFile(const char *fileName, vector<CRectangle> &rectangles)\r\n```\r\nИмя функции как-то не слишком вяжется с тем, что она делает.\r\nКроме того, функция нарушает правило: \"одна функция - одна задача\". Она делает 2 задачи - считывает прямоугольник из файла и записывает в вектор. Что сразу же снижает ее универсальность - просто считать прямоугольник, или поместить его в иную коллекцию будет невозможно"}}