{"action":"created","comment":{"url":"https://api.github.com/repos/BlueBrain/Brayns/pulls/comments/227691801","pull_request_review_id":167776982,"id":227691801,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzY5MTgwMQ==","diff_hunk":"@@ -34,4 +36,18 @@ inline auto lowerCase(std::string str)\n     std::transform(str.begin(), str.end(), str.begin(), ::tolower);\n     return str;\n }\n+\n+template <typename T>\n+inline T enumSet(const T eA, const T eB)","path":"brayns/common/utils/Utils.h","position":15,"original_position":15,"commit_id":"f8584a205ee5d56a80ac41045e59fe338557f386","original_commit_id":"f8584a205ee5d56a80ac41045e59fe338557f386","user":{"login":"hernando","id":791427,"node_id":"MDQ6VXNlcjc5MTQyNw==","avatar_url":"https://avatars3.githubusercontent.com/u/791427?v=4","gravatar_id":"","url":"https://api.github.com/users/hernando","html_url":"https://github.com/hernando","followers_url":"https://api.github.com/users/hernando/followers","following_url":"https://api.github.com/users/hernando/following{/other_user}","gists_url":"https://api.github.com/users/hernando/gists{/gist_id}","starred_url":"https://api.github.com/users/hernando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hernando/subscriptions","organizations_url":"https://api.github.com/users/hernando/orgs","repos_url":"https://api.github.com/users/hernando/repos","events_url":"https://api.github.com/users/hernando/events{/privacy}","received_events_url":"https://api.github.com/users/hernando/received_events","type":"User","site_admin":false},"body":"```suggestion\r\ntemplate <typename T>\r\ninline typename std::underlying_type<T>::type setBit(const std::underlying_type<T>::type mask, const T bit)\r\n{\r\n     return mask | static_cast<typename std::underlying_type<T>::type>(bit);\r\n}\r\n```\r\n\r\nYou should return the underlying type, because semantically the output value is not the enum anymore.\r\nBut even worse, imagine you have this code\r\n\r\n    enum class A : int { a = 1, b = 2 };\r\n    int f(const A a)\r\n    {\r\n        switch(a)\r\n        {\r\n            case A::a: return int(a);\r\n            case A::b: return int(a);\r\n        }\r\n    }\r\n\r\nThat code if perfect, but if you call f with something A(17), the function return value will be undefined.","created_at":"2018-10-24T08:38:35Z","updated_at":"2018-10-24T08:50:27Z","html_url":"https://github.com/BlueBrain/Brayns/pull/599#discussion_r227691801","pull_request_url":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/BlueBrain/Brayns/pulls/comments/227691801"},"html":{"href":"https://github.com/BlueBrain/Brayns/pull/599#discussion_r227691801"},"pull_request":{"href":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599"}}},"pull_request":{"url":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599","id":225001453,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MDAxNDUz","html_url":"https://github.com/BlueBrain/Brayns/pull/599","diff_url":"https://github.com/BlueBrain/Brayns/pull/599.diff","patch_url":"https://github.com/BlueBrain/Brayns/pull/599.patch","issue_url":"https://api.github.com/repos/BlueBrain/Brayns/issues/599","number":599,"state":"open","locked":false,"title":"Add 'default-bvh' command line flag","user":{"login":"karjonas","id":754587,"node_id":"MDQ6VXNlcjc1NDU4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/754587?v=4","gravatar_id":"","url":"https://api.github.com/users/karjonas","html_url":"https://github.com/karjonas","followers_url":"https://api.github.com/users/karjonas/followers","following_url":"https://api.github.com/users/karjonas/following{/other_user}","gists_url":"https://api.github.com/users/karjonas/gists{/gist_id}","starred_url":"https://api.github.com/users/karjonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karjonas/subscriptions","organizations_url":"https://api.github.com/users/karjonas/orgs","repos_url":"https://api.github.com/users/karjonas/repos","events_url":"https://api.github.com/users/karjonas/events{/privacy}","received_events_url":"https://api.github.com/users/karjonas/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-23T11:31:58Z","updated_at":"2018-10-24T08:50:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98879ff646bf864c81abd5a68deb4cad68ca44ff","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599/commits","review_comments_url":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599/comments","review_comment_url":"https://api.github.com/repos/BlueBrain/Brayns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BlueBrain/Brayns/issues/599/comments","statuses_url":"https://api.github.com/repos/BlueBrain/Brayns/statuses/f8584a205ee5d56a80ac41045e59fe338557f386","head":{"label":"karjonas:bvh_flag","ref":"bvh_flag","sha":"f8584a205ee5d56a80ac41045e59fe338557f386","user":{"login":"karjonas","id":754587,"node_id":"MDQ6VXNlcjc1NDU4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/754587?v=4","gravatar_id":"","url":"https://api.github.com/users/karjonas","html_url":"https://github.com/karjonas","followers_url":"https://api.github.com/users/karjonas/followers","following_url":"https://api.github.com/users/karjonas/following{/other_user}","gists_url":"https://api.github.com/users/karjonas/gists{/gist_id}","starred_url":"https://api.github.com/users/karjonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karjonas/subscriptions","organizations_url":"https://api.github.com/users/karjonas/orgs","repos_url":"https://api.github.com/users/karjonas/repos","events_url":"https://api.github.com/users/karjonas/events{/privacy}","received_events_url":"https://api.github.com/users/karjonas/received_events","type":"User","site_admin":false},"repo":{"id":120600722,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA2MDA3MjI=","name":"Brayns","full_name":"karjonas/Brayns","private":false,"owner":{"login":"karjonas","id":754587,"node_id":"MDQ6VXNlcjc1NDU4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/754587?v=4","gravatar_id":"","url":"https://api.github.com/users/karjonas","html_url":"https://github.com/karjonas","followers_url":"https://api.github.com/users/karjonas/followers","following_url":"https://api.github.com/users/karjonas/following{/other_user}","gists_url":"https://api.github.com/users/karjonas/gists{/gist_id}","starred_url":"https://api.github.com/users/karjonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karjonas/subscriptions","organizations_url":"https://api.github.com/users/karjonas/orgs","repos_url":"https://api.github.com/users/karjonas/repos","events_url":"https://api.github.com/users/karjonas/events{/privacy}","received_events_url":"https://api.github.com/users/karjonas/received_events","type":"User","site_admin":false},"html_url":"https://github.com/karjonas/Brayns","description":"Interactive raytracing of neuroscience data","fork":true,"url":"https://api.github.com/repos/karjonas/Brayns","forks_url":"https://api.github.com/repos/karjonas/Brayns/forks","keys_url":"https://api.github.com/repos/karjonas/Brayns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karjonas/Brayns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karjonas/Brayns/teams","hooks_url":"https://api.github.com/repos/karjonas/Brayns/hooks","issue_events_url":"https://api.github.com/repos/karjonas/Brayns/issues/events{/number}","events_url":"https://api.github.com/repos/karjonas/Brayns/events","assignees_url":"https://api.github.com/repos/karjonas/Brayns/assignees{/user}","branches_url":"https://api.github.com/repos/karjonas/Brayns/branches{/branch}","tags_url":"https://api.github.com/repos/karjonas/Brayns/tags","blobs_url":"https://api.github.com/repos/karjonas/Brayns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karjonas/Brayns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karjonas/Brayns/git/refs{/sha}","trees_url":"https://api.github.com/repos/karjonas/Brayns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karjonas/Brayns/statuses/{sha}","languages_url":"https://api.github.com/repos/karjonas/Brayns/languages","stargazers_url":"https://api.github.com/repos/karjonas/Brayns/stargazers","contributors_url":"https://api.github.com/repos/karjonas/Brayns/contributors","subscribers_url":"https://api.github.com/repos/karjonas/Brayns/subscribers","subscription_url":"https://api.github.com/repos/karjonas/Brayns/subscription","commits_url":"https://api.github.com/repos/karjonas/Brayns/commits{/sha}","git_commits_url":"https://api.github.com/repos/karjonas/Brayns/git/commits{/sha}","comments_url":"https://api.github.com/repos/karjonas/Brayns/comments{/number}","issue_comment_url":"https://api.github.com/repos/karjonas/Brayns/issues/comments{/number}","contents_url":"https://api.github.com/repos/karjonas/Brayns/contents/{+path}","compare_url":"https://api.github.com/repos/karjonas/Brayns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karjonas/Brayns/merges","archive_url":"https://api.github.com/repos/karjonas/Brayns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karjonas/Brayns/downloads","issues_url":"https://api.github.com/repos/karjonas/Brayns/issues{/number}","pulls_url":"https://api.github.com/repos/karjonas/Brayns/pulls{/number}","milestones_url":"https://api.github.com/repos/karjonas/Brayns/milestones{/number}","notifications_url":"https://api.github.com/repos/karjonas/Brayns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karjonas/Brayns/labels{/name}","releases_url":"https://api.github.com/repos/karjonas/Brayns/releases{/id}","deployments_url":"https://api.github.com/repos/karjonas/Brayns/deployments","created_at":"2018-02-07T10:32:04Z","updated_at":"2018-10-23T10:33:34Z","pushed_at":"2018-10-23T15:25:06Z","git_url":"git://github.com/karjonas/Brayns.git","ssh_url":"git@github.com:karjonas/Brayns.git","clone_url":"https://github.com/karjonas/Brayns.git","svn_url":"https://github.com/karjonas/Brayns","homepage":"","size":89740,"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,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BlueBrain:master","ref":"master","sha":"0128228d4b032f518109f189fa306d7dfb75121f","user":{"login":"BlueBrain","id":1479142,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NzkxNDI=","avatar_url":"https://avatars1.githubusercontent.com/u/1479142?v=4","gravatar_id":"","url":"https://api.github.com/users/BlueBrain","html_url":"https://github.com/BlueBrain","followers_url":"https://api.github.com/users/BlueBrain/followers","following_url":"https://api.github.com/users/BlueBrain/following{/other_user}","gists_url":"https://api.github.com/users/BlueBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/BlueBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlueBrain/subscriptions","organizations_url":"https://api.github.com/users/BlueBrain/orgs","repos_url":"https://api.github.com/users/BlueBrain/repos","events_url":"https://api.github.com/users/BlueBrain/events{/privacy}","received_events_url":"https://api.github.com/users/BlueBrain/received_events","type":"Organization","site_admin":false},"repo":{"id":61363694,"node_id":"MDEwOlJlcG9zaXRvcnk2MTM2MzY5NA==","name":"Brayns","full_name":"BlueBrain/Brayns","private":false,"owner":{"login":"BlueBrain","id":1479142,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NzkxNDI=","avatar_url":"https://avatars1.githubusercontent.com/u/1479142?v=4","gravatar_id":"","url":"https://api.github.com/users/BlueBrain","html_url":"https://github.com/BlueBrain","followers_url":"https://api.github.com/users/BlueBrain/followers","following_url":"https://api.github.com/users/BlueBrain/following{/other_user}","gists_url":"https://api.github.com/users/BlueBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/BlueBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BlueBrain/subscriptions","organizations_url":"https://api.github.com/users/BlueBrain/orgs","repos_url":"https://api.github.com/users/BlueBrain/repos","events_url":"https://api.github.com/users/BlueBrain/events{/privacy}","received_events_url":"https://api.github.com/users/BlueBrain/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BlueBrain/Brayns","description":"Visualizer for large-scale and interactive ray-tracing of neurons ","fork":false,"url":"https://api.github.com/repos/BlueBrain/Brayns","forks_url":"https://api.github.com/repos/BlueBrain/Brayns/forks","keys_url":"https://api.github.com/repos/BlueBrain/Brayns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BlueBrain/Brayns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BlueBrain/Brayns/teams","hooks_url":"https://api.github.com/repos/BlueBrain/Brayns/hooks","issue_events_url":"https://api.github.com/repos/BlueBrain/Brayns/issues/events{/number}","events_url":"https://api.github.com/repos/BlueBrain/Brayns/events","assignees_url":"https://api.github.com/repos/BlueBrain/Brayns/assignees{/user}","branches_url":"https://api.github.com/repos/BlueBrain/Brayns/branches{/branch}","tags_url":"https://api.github.com/repos/BlueBrain/Brayns/tags","blobs_url":"https://api.github.com/repos/BlueBrain/Brayns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BlueBrain/Brayns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BlueBrain/Brayns/git/refs{/sha}","trees_url":"https://api.github.com/repos/BlueBrain/Brayns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BlueBrain/Brayns/statuses/{sha}","languages_url":"https://api.github.com/repos/BlueBrain/Brayns/languages","stargazers_url":"https://api.github.com/repos/BlueBrain/Brayns/stargazers","contributors_url":"https://api.github.com/repos/BlueBrain/Brayns/contributors","subscribers_url":"https://api.github.com/repos/BlueBrain/Brayns/subscribers","subscription_url":"https://api.github.com/repos/BlueBrain/Brayns/subscription","commits_url":"https://api.github.com/repos/BlueBrain/Brayns/commits{/sha}","git_commits_url":"https://api.github.com/repos/BlueBrain/Brayns/git/commits{/sha}","comments_url":"https://api.github.com/repos/BlueBrain/Brayns/comments{/number}","issue_comment_url":"https://api.github.com/repos/BlueBrain/Brayns/issues/comments{/number}","contents_url":"https://api.github.com/repos/BlueBrain/Brayns/contents/{+path}","compare_url":"https://api.github.com/repos/BlueBrain/Brayns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BlueBrain/Brayns/merges","archive_url":"https://api.github.com/repos/BlueBrain/Brayns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BlueBrain/Brayns/downloads","issues_url":"https://api.github.com/repos/BlueBrain/Brayns/issues{/number}","pulls_url":"https://api.github.com/repos/BlueBrain/Brayns/pulls{/number}","milestones_url":"https://api.github.com/repos/BlueBrain/Brayns/milestones{/number}","notifications_url":"https://api.github.com/repos/BlueBrain/Brayns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BlueBrain/Brayns/labels{/name}","releases_url":"https://api.github.com/repos/BlueBrain/Brayns/releases{/id}","deployments_url":"https://api.github.com/repos/BlueBrain/Brayns/deployments","created_at":"2016-06-17T09:49:06Z","updated_at":"2018-10-24T06:16:45Z","pushed_at":"2018-10-23T15:25:08Z","git_url":"git://github.com/BlueBrain/Brayns.git","ssh_url":"git@github.com:BlueBrain/Brayns.git","clone_url":"https://github.com/BlueBrain/Brayns.git","svn_url":"https://github.com/BlueBrain/Brayns","homepage":"","size":89711,"stargazers_count":143,"watchers_count":143,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":28,"open_issues":31,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599"},"html":{"href":"https://github.com/BlueBrain/Brayns/pull/599"},"issue":{"href":"https://api.github.com/repos/BlueBrain/Brayns/issues/599"},"comments":{"href":"https://api.github.com/repos/BlueBrain/Brayns/issues/599/comments"},"review_comments":{"href":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599/comments"},"review_comment":{"href":"https://api.github.com/repos/BlueBrain/Brayns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BlueBrain/Brayns/pulls/599/commits"},"statuses":{"href":"https://api.github.com/repos/BlueBrain/Brayns/statuses/f8584a205ee5d56a80ac41045e59fe338557f386"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"hernando"}}