{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/47418258","id":47418258,"diff_hunk":"@@ -228,27 +229,28 @@ void CEXIChannel::DoState(PointerWrap &p)\n \tp.Do(m_Control);\n \tp.Do(m_ImmData);\n \n-\tfor (int d = 0; d < NUM_DEVICES; ++d)\n+\tfor (int device_index = 0; device_index < NUM_DEVICES; ++device_index)\n \t{\n-\t\tIEXIDevice* pDevice = m_pDevices[d].get();\n-\t\tTEXIDevices type = pDevice->m_deviceType;\n+\t\tstd::unique_ptr<IEXIDevice>& device = m_pDevices[device_index];\n+\t\tTEXIDevices type = device->m_deviceType;\n \t\tp.Do(type);\n-\t\tIEXIDevice* pSaveDevice = (type == pDevice->m_deviceType) ? pDevice : EXIDevice_Create(type, m_ChannelId);\n-\t\tpSaveDevice->DoState(p);\n-\t\tif (pSaveDevice != pDevice)\n+\n+\t\tif (type == device->m_deviceType)\n \t\t{\n-\t\t\t// if we had to create a temporary device, discard it if we're not loading.\n+\t\t\tdevice->DoState(p);\n+\t\t}\n+\t\telse\n+\t\t{\n+\t\t\t// If we had to create a temporary device, discard it if we're not loading.","path":"Source/Core/Core/HW/EXI_Channel.cpp","position":65,"original_position":65,"commit_id":"561218c4127d939a2dbdee38c7d0e5e6b66cff64","original_commit_id":"561218c4127d939a2dbdee38c7d0e5e6b66cff64","user":{"login":"phire","id":138484,"avatar_url":"https://avatars.githubusercontent.com/u/138484?v=3","gravatar_id":"","url":"https://api.github.com/users/phire","html_url":"https://github.com/phire","followers_url":"https://api.github.com/users/phire/followers","following_url":"https://api.github.com/users/phire/following{/other_user}","gists_url":"https://api.github.com/users/phire/gists{/gist_id}","starred_url":"https://api.github.com/users/phire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phire/subscriptions","organizations_url":"https://api.github.com/users/phire/orgs","repos_url":"https://api.github.com/users/phire/repos","events_url":"https://api.github.com/users/phire/events{/privacy}","received_events_url":"https://api.github.com/users/phire/received_events","type":"User","site_admin":false},"body":"I'm not sure, but this comment appears to be out of date.","created_at":"2015-12-11T23:30:54Z","updated_at":"2015-12-11T23:30:54Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/3330#discussion_r47418258","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/47418258"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3330#discussion_r47418258"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330","id":53456415,"html_url":"https://github.com/dolphin-emu/dolphin/pull/3330","diff_url":"https://github.com/dolphin-emu/dolphin/pull/3330.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/3330.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3330","number":3330,"state":"open","locked":false,"title":"EXI/SI: Get rid of explicit delete and new","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"body":"Gets rid of explicit delete and new with regards to channel management.","created_at":"2015-12-11T23:15:19Z","updated_at":"2015-12-11T23:30:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b333960d3d028a8b684ab51aa6bb49abab9847c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3330/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/561218c4127d939a2dbdee38c7d0e5e6b66cff64","head":{"label":"lioncash:alloc","ref":"alloc","sha":"561218c4127d939a2dbdee38c7d0e5e6b66cff64","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"repo":{"id":16295983,"name":"dolphin","full_name":"lioncash/dolphin","owner":{"login":"lioncash","id":712067,"avatar_url":"https://avatars.githubusercontent.com/u/712067?v=3","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lioncash/dolphin","description":"Dolphin is a GameCube/Wii emulator, allowing you to play games for these two platforms on PC, with improvements.","fork":true,"url":"https://api.github.com/repos/lioncash/dolphin","forks_url":"https://api.github.com/repos/lioncash/dolphin/forks","keys_url":"https://api.github.com/repos/lioncash/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lioncash/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lioncash/dolphin/teams","hooks_url":"https://api.github.com/repos/lioncash/dolphin/hooks","issue_events_url":"https://api.github.com/repos/lioncash/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/lioncash/dolphin/events","assignees_url":"https://api.github.com/repos/lioncash/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/lioncash/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/lioncash/dolphin/tags","blobs_url":"https://api.github.com/repos/lioncash/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lioncash/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lioncash/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/lioncash/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lioncash/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/lioncash/dolphin/languages","stargazers_url":"https://api.github.com/repos/lioncash/dolphin/stargazers","contributors_url":"https://api.github.com/repos/lioncash/dolphin/contributors","subscribers_url":"https://api.github.com/repos/lioncash/dolphin/subscribers","subscription_url":"https://api.github.com/repos/lioncash/dolphin/subscription","commits_url":"https://api.github.com/repos/lioncash/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/lioncash/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/lioncash/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/lioncash/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/lioncash/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/lioncash/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lioncash/dolphin/merges","archive_url":"https://api.github.com/repos/lioncash/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lioncash/dolphin/downloads","issues_url":"https://api.github.com/repos/lioncash/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/lioncash/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/lioncash/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/lioncash/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lioncash/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/lioncash/dolphin/releases{/id}","created_at":"2014-01-27T23:00:05Z","updated_at":"2015-04-20T17:09:16Z","pushed_at":"2015-12-11T23:10:29Z","git_url":"git://github.com/lioncash/dolphin.git","ssh_url":"git@github.com:lioncash/dolphin.git","clone_url":"https://github.com/lioncash/dolphin.git","svn_url":"https://github.com/lioncash/dolphin","homepage":null,"size":223092,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"dolphin-emu:master","ref":"master","sha":"cb5be45f728ae282177c31daded54fbce1e5285f","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","created_at":"2013-07-22T09:07:57Z","updated_at":"2015-12-11T23:11:40Z","pushed_at":"2015-12-11T23:15:19Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":"https://dolphin-emu.org/","size":249773,"stargazers_count":1846,"watchers_count":1846,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":569,"mirror_url":null,"open_issues_count":72,"forks":569,"open_issues":72,"watchers":1846,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3330"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3330"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3330/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3330/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/561218c4127d939a2dbdee38c7d0e5e6b66cff64"}}}}