{"action":"created","comment":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/25994760","id":25994760,"diff_hunk":"@@ -376,63 +376,59 @@ void CPVRChannelGroup::SortByChannelNumber(void)\n \n CPVRChannelPtr CPVRChannelGroup::GetByClient(int iUniqueChannelId, int iClientID) const\n {\n+  CPVRChannelPtr retval;\n   CSingleLock lock(m_critSection);\n \n-  for (unsigned int ptr = 0; ptr < m_members.size(); ptr++)\n+  for (std::vector<PVRChannelGroupMember>::const_iterator it = m_members.begin(); !retval && it != m_members.end(); ++it)\n   {\n-    PVRChannelGroupMember groupMember = m_members.at(ptr);\n-    if (groupMember.channel->UniqueID() == iUniqueChannelId &&\n-        groupMember.channel->ClientID() == iClientID)\n-      return groupMember.channel;\n+    if ((*it).channel->UniqueID() == iUniqueChannelId &&\n+        (*it).channel->ClientID() == iClientID)\n+      retval = (*it).channel;","path":"xbmc/pvr/channels/PVRChannelGroup.cpp","position":29,"original_position":29,"commit_id":"bc1c3b1d269fb8263f9f9dc2b36b9dca5d4f657f","original_commit_id":"bc1c3b1d269fb8263f9f9dc2b36b9dca5d4f657f","user":{"login":"opdenkamp","id":441806,"avatar_url":"https://avatars.githubusercontent.com/u/441806?v=3","gravatar_id":"","url":"https://api.github.com/users/opdenkamp","html_url":"https://github.com/opdenkamp","followers_url":"https://api.github.com/users/opdenkamp/followers","following_url":"https://api.github.com/users/opdenkamp/following{/other_user}","gists_url":"https://api.github.com/users/opdenkamp/gists{/gist_id}","starred_url":"https://api.github.com/users/opdenkamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opdenkamp/subscriptions","organizations_url":"https://api.github.com/users/opdenkamp/orgs","repos_url":"https://api.github.com/users/opdenkamp/repos","events_url":"https://api.github.com/users/opdenkamp/events{/privacy}","received_events_url":"https://api.github.com/users/opdenkamp/received_events","type":"User","site_admin":false},"body":"I don't think that it's more complex to not put half of the break condition in the for line and another one in the loop.","created_at":"2015-03-07T09:13:15Z","updated_at":"2015-03-07T09:13:15Z","html_url":"https://github.com/xbmc/xbmc/pull/6635#discussion_r25994760","pull_request_url":"https://api.github.com/repos/xbmc/xbmc/pulls/6635","_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments/25994760"},"html":{"href":"https://github.com/xbmc/xbmc/pull/6635#discussion_r25994760"},"pull_request":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/6635"}}},"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/6635","id":30694104,"html_url":"https://github.com/xbmc/xbmc/pull/6635","diff_url":"https://github.com/xbmc/xbmc/pull/6635.diff","patch_url":"https://github.com/xbmc/xbmc/pull/6635.patch","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/6635","number":6635,"state":"open","locked":false,"title":"[pvr] optimise CPVRChannelGroup","user":{"login":"opdenkamp","id":441806,"avatar_url":"https://avatars.githubusercontent.com/u/441806?v=3","gravatar_id":"","url":"https://api.github.com/users/opdenkamp","html_url":"https://github.com/opdenkamp","followers_url":"https://api.github.com/users/opdenkamp/followers","following_url":"https://api.github.com/users/opdenkamp/following{/other_user}","gists_url":"https://api.github.com/users/opdenkamp/gists{/gist_id}","starred_url":"https://api.github.com/users/opdenkamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opdenkamp/subscriptions","organizations_url":"https://api.github.com/users/opdenkamp/orgs","repos_url":"https://api.github.com/users/opdenkamp/repos","events_url":"https://api.github.com/users/opdenkamp/events{/privacy}","received_events_url":"https://api.github.com/users/opdenkamp/received_events","type":"User","site_admin":false},"body":"replaced a ton of `vector::at()` calls by iterators and made epg getters const","created_at":"2015-03-07T01:28:56Z","updated_at":"2015-03-07T09:13:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b5d5ca1f5442e68c4ec4d8de068ebe8ab6621ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xbmc/xbmc/pulls/6635/commits","review_comments_url":"https://api.github.com/repos/xbmc/xbmc/pulls/6635/comments","review_comment_url":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/6635/comments","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/bc1c3b1d269fb8263f9f9dc2b36b9dca5d4f657f","head":{"label":"opdenkamp:optimisegroups","ref":"optimisegroups","sha":"bc1c3b1d269fb8263f9f9dc2b36b9dca5d4f657f","user":{"login":"opdenkamp","id":441806,"avatar_url":"https://avatars.githubusercontent.com/u/441806?v=3","gravatar_id":"","url":"https://api.github.com/users/opdenkamp","html_url":"https://github.com/opdenkamp","followers_url":"https://api.github.com/users/opdenkamp/followers","following_url":"https://api.github.com/users/opdenkamp/following{/other_user}","gists_url":"https://api.github.com/users/opdenkamp/gists{/gist_id}","starred_url":"https://api.github.com/users/opdenkamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opdenkamp/subscriptions","organizations_url":"https://api.github.com/users/opdenkamp/orgs","repos_url":"https://api.github.com/users/opdenkamp/repos","events_url":"https://api.github.com/users/opdenkamp/events{/privacy}","received_events_url":"https://api.github.com/users/opdenkamp/received_events","type":"User","site_admin":false},"repo":{"id":1217826,"name":"xbmc","full_name":"opdenkamp/xbmc","owner":{"login":"opdenkamp","id":441806,"avatar_url":"https://avatars.githubusercontent.com/u/441806?v=3","gravatar_id":"","url":"https://api.github.com/users/opdenkamp","html_url":"https://github.com/opdenkamp","followers_url":"https://api.github.com/users/opdenkamp/followers","following_url":"https://api.github.com/users/opdenkamp/following{/other_user}","gists_url":"https://api.github.com/users/opdenkamp/gists{/gist_id}","starred_url":"https://api.github.com/users/opdenkamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opdenkamp/subscriptions","organizations_url":"https://api.github.com/users/opdenkamp/orgs","repos_url":"https://api.github.com/users/opdenkamp/repos","events_url":"https://api.github.com/users/opdenkamp/events{/privacy}","received_events_url":"https://api.github.com/users/opdenkamp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/opdenkamp/xbmc","description":"Old XBMC PVR Development Repository. PVR support has been included in mainline XBMC now!","fork":true,"url":"https://api.github.com/repos/opdenkamp/xbmc","forks_url":"https://api.github.com/repos/opdenkamp/xbmc/forks","keys_url":"https://api.github.com/repos/opdenkamp/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opdenkamp/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opdenkamp/xbmc/teams","hooks_url":"https://api.github.com/repos/opdenkamp/xbmc/hooks","issue_events_url":"https://api.github.com/repos/opdenkamp/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/opdenkamp/xbmc/events","assignees_url":"https://api.github.com/repos/opdenkamp/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/opdenkamp/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/opdenkamp/xbmc/tags","blobs_url":"https://api.github.com/repos/opdenkamp/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opdenkamp/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opdenkamp/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/opdenkamp/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opdenkamp/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/opdenkamp/xbmc/languages","stargazers_url":"https://api.github.com/repos/opdenkamp/xbmc/stargazers","contributors_url":"https://api.github.com/repos/opdenkamp/xbmc/contributors","subscribers_url":"https://api.github.com/repos/opdenkamp/xbmc/subscribers","subscription_url":"https://api.github.com/repos/opdenkamp/xbmc/subscription","commits_url":"https://api.github.com/repos/opdenkamp/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/opdenkamp/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/opdenkamp/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/opdenkamp/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/opdenkamp/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/opdenkamp/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opdenkamp/xbmc/merges","archive_url":"https://api.github.com/repos/opdenkamp/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opdenkamp/xbmc/downloads","issues_url":"https://api.github.com/repos/opdenkamp/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/opdenkamp/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/opdenkamp/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/opdenkamp/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opdenkamp/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/opdenkamp/xbmc/releases{/id}","created_at":"2011-01-03T22:38:58Z","updated_at":"2014-12-25T14:32:05Z","pushed_at":"2015-03-07T01:28:08Z","git_url":"git://github.com/opdenkamp/xbmc.git","ssh_url":"git@github.com:opdenkamp/xbmc.git","clone_url":"https://github.com/opdenkamp/xbmc.git","svn_url":"https://github.com/opdenkamp/xbmc","homepage":"http://xbmc.org","size":581699,"stargazers_count":200,"watchers_count":200,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":0,"forks":42,"open_issues":0,"watchers":200,"default_branch":"Eden-pvr"}},"base":{"label":"xbmc:master","ref":"master","sha":"b7ccb83d8f9472d54b6639ef006e8575e4b9c100","user":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"repo":{"id":1217614,"name":"xbmc","full_name":"xbmc/xbmc","owner":{"login":"xbmc","id":199122,"avatar_url":"https://avatars.githubusercontent.com/u/199122?v=3","gravatar_id":"","url":"https://api.github.com/users/xbmc","html_url":"https://github.com/xbmc","followers_url":"https://api.github.com/users/xbmc/followers","following_url":"https://api.github.com/users/xbmc/following{/other_user}","gists_url":"https://api.github.com/users/xbmc/gists{/gist_id}","starred_url":"https://api.github.com/users/xbmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xbmc/subscriptions","organizations_url":"https://api.github.com/users/xbmc/orgs","repos_url":"https://api.github.com/users/xbmc/repos","events_url":"https://api.github.com/users/xbmc/events{/privacy}","received_events_url":"https://api.github.com/users/xbmc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xbmc/xbmc","description":"Kodi Main Repository - By using this code you agree with our policy and will follow the GPLv2 license as included","fork":false,"url":"https://api.github.com/repos/xbmc/xbmc","forks_url":"https://api.github.com/repos/xbmc/xbmc/forks","keys_url":"https://api.github.com/repos/xbmc/xbmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xbmc/xbmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xbmc/xbmc/teams","hooks_url":"https://api.github.com/repos/xbmc/xbmc/hooks","issue_events_url":"https://api.github.com/repos/xbmc/xbmc/issues/events{/number}","events_url":"https://api.github.com/repos/xbmc/xbmc/events","assignees_url":"https://api.github.com/repos/xbmc/xbmc/assignees{/user}","branches_url":"https://api.github.com/repos/xbmc/xbmc/branches{/branch}","tags_url":"https://api.github.com/repos/xbmc/xbmc/tags","blobs_url":"https://api.github.com/repos/xbmc/xbmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xbmc/xbmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xbmc/xbmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/xbmc/xbmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xbmc/xbmc/statuses/{sha}","languages_url":"https://api.github.com/repos/xbmc/xbmc/languages","stargazers_url":"https://api.github.com/repos/xbmc/xbmc/stargazers","contributors_url":"https://api.github.com/repos/xbmc/xbmc/contributors","subscribers_url":"https://api.github.com/repos/xbmc/xbmc/subscribers","subscription_url":"https://api.github.com/repos/xbmc/xbmc/subscription","commits_url":"https://api.github.com/repos/xbmc/xbmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/xbmc/xbmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/xbmc/xbmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/xbmc/xbmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/xbmc/xbmc/contents/{+path}","compare_url":"https://api.github.com/repos/xbmc/xbmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xbmc/xbmc/merges","archive_url":"https://api.github.com/repos/xbmc/xbmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xbmc/xbmc/downloads","issues_url":"https://api.github.com/repos/xbmc/xbmc/issues{/number}","pulls_url":"https://api.github.com/repos/xbmc/xbmc/pulls{/number}","milestones_url":"https://api.github.com/repos/xbmc/xbmc/milestones{/number}","notifications_url":"https://api.github.com/repos/xbmc/xbmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xbmc/xbmc/labels{/name}","releases_url":"https://api.github.com/repos/xbmc/xbmc/releases{/id}","created_at":"2011-01-03T21:18:51Z","updated_at":"2015-03-07T01:19:42Z","pushed_at":"2015-03-07T07:23:59Z","git_url":"git://github.com/xbmc/xbmc.git","ssh_url":"git@github.com:xbmc/xbmc.git","clone_url":"https://github.com/xbmc/xbmc.git","svn_url":"https://github.com/xbmc/xbmc","homepage":"http://kodi.wiki/view/Official:Trademark_Policy","size":1823160,"stargazers_count":3750,"watchers_count":3750,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2712,"mirror_url":null,"open_issues_count":237,"forks":2712,"open_issues":237,"watchers":3750,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/6635"},"html":{"href":"https://github.com/xbmc/xbmc/pull/6635"},"issue":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/6635"},"comments":{"href":"https://api.github.com/repos/xbmc/xbmc/issues/6635/comments"},"review_comments":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/6635/comments"},"review_comment":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xbmc/xbmc/pulls/6635/commits"},"statuses":{"href":"https://api.github.com/repos/xbmc/xbmc/statuses/bc1c3b1d269fb8263f9f9dc2b36b9dca5d4f657f"}}}}