{"action":"created","comment":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/23898242","id":23898242,"diff_hunk":"@@ -108,37 +95,18 @@ class Interface  : public Kernel::Session {\n     /**\n      * Registers the functions in the service\n      */\n-    void Register(const FunctionInfo* functions, int len) {\n-        for (int i = 0; i < len; i++) {\n-            m_functions[functions[i].id] = functions[i];\n+    template <size_t N>\n+    void Register(const FunctionInfo (&functions)[N]) {\n+        m_functions.reserve(N);\n+        for (auto& fn : functions) {\n+            // Usually this array is sorted by id already, so hint to instead at the end\n+            m_functions.emplace_hint(m_functions.cend(), fn.id, fn);\n         }\n     }\n \n private:\n+    boost::container::flat_map<u32, FunctionInfo> m_functions;","path":"src/core/hle/service/service.h","position":100,"original_position":100,"commit_id":"33daa2c90e1a93cf6804d2c7d8fb767ce5155edd","original_commit_id":"33daa2c90e1a93cf6804d2c7d8fb767ce5155edd","user":{"login":"bunnei","id":6956688,"avatar_url":"https://avatars.githubusercontent.com/u/6956688?v=3","gravatar_id":"","url":"https://api.github.com/users/bunnei","html_url":"https://github.com/bunnei","followers_url":"https://api.github.com/users/bunnei/followers","following_url":"https://api.github.com/users/bunnei/following{/other_user}","gists_url":"https://api.github.com/users/bunnei/gists{/gist_id}","starred_url":"https://api.github.com/users/bunnei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunnei/subscriptions","organizations_url":"https://api.github.com/users/bunnei/orgs","repos_url":"https://api.github.com/users/bunnei/repos","events_url":"https://api.github.com/users/bunnei/events{/privacy}","received_events_url":"https://api.github.com/users/bunnei/received_events","type":"User","site_admin":false},"body":"Why boost's flat_map instead of just std::map?","created_at":"2015-02-01T15:23:00Z","updated_at":"2015-02-01T15:23:00Z","html_url":"https://github.com/citra-emu/citra/pull/523#discussion_r23898242","pull_request_url":"https://api.github.com/repos/citra-emu/citra/pulls/523","_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/23898242"},"html":{"href":"https://github.com/citra-emu/citra/pull/523#discussion_r23898242"},"pull_request":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/523"}}},"pull_request":{"url":"https://api.github.com/repos/citra-emu/citra/pulls/523","id":28424937,"html_url":"https://github.com/citra-emu/citra/pull/523","diff_url":"https://github.com/citra-emu/citra/pull/523.diff","patch_url":"https://github.com/citra-emu/citra/pull/523.patch","issue_url":"https://api.github.com/repos/citra-emu/citra/issues/523","number":523,"state":"open","locked":false,"title":"Kernel Lifetime Reform Pt. 5: The Reckoning","user":{"login":"yuriks","id":341401,"avatar_url":"https://avatars.githubusercontent.com/u/341401?v=3","gravatar_id":"","url":"https://api.github.com/users/yuriks","html_url":"https://github.com/yuriks","followers_url":"https://api.github.com/users/yuriks/followers","following_url":"https://api.github.com/users/yuriks/following{/other_user}","gists_url":"https://api.github.com/users/yuriks/gists{/gist_id}","starred_url":"https://api.github.com/users/yuriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuriks/subscriptions","organizations_url":"https://api.github.com/users/yuriks/orgs","repos_url":"https://api.github.com/users/yuriks/repos","events_url":"https://api.github.com/users/yuriks/events{/privacy}","received_events_url":"https://api.github.com/users/yuriks/received_events","type":"User","site_admin":false},"body":"The thrilling and final PR of the exciting Kernel Lifetime franchise!\r\n\r\nThis is honestly all over the place. It cleans up the last few uses of handles, removes things I wanted to remove after all was said and done, finally enables CloseHandle(!!!) and resolves a few minor lifetime issues which now need to work properly.","created_at":"2015-02-01T02:15:38Z","updated_at":"2015-02-01T15:23:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3dc5e7f92ccaa5557bc8b6900b522e89448a5c67","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/citra-emu/citra/pulls/523/commits","review_comments_url":"https://api.github.com/repos/citra-emu/citra/pulls/523/comments","review_comment_url":"https://api.github.com/repos/citra-emu/citra/pulls/comments/{number}","comments_url":"https://api.github.com/repos/citra-emu/citra/issues/523/comments","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/33daa2c90e1a93cf6804d2c7d8fb767ce5155edd","head":{"label":"yuriks:kernel-lifetime5","ref":"kernel-lifetime5","sha":"33daa2c90e1a93cf6804d2c7d8fb767ce5155edd","user":{"login":"yuriks","id":341401,"avatar_url":"https://avatars.githubusercontent.com/u/341401?v=3","gravatar_id":"","url":"https://api.github.com/users/yuriks","html_url":"https://github.com/yuriks","followers_url":"https://api.github.com/users/yuriks/followers","following_url":"https://api.github.com/users/yuriks/following{/other_user}","gists_url":"https://api.github.com/users/yuriks/gists{/gist_id}","starred_url":"https://api.github.com/users/yuriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuriks/subscriptions","organizations_url":"https://api.github.com/users/yuriks/orgs","repos_url":"https://api.github.com/users/yuriks/repos","events_url":"https://api.github.com/users/yuriks/events{/privacy}","received_events_url":"https://api.github.com/users/yuriks/received_events","type":"User","site_admin":false},"repo":{"id":22018631,"name":"citra","full_name":"yuriks/citra","owner":{"login":"yuriks","id":341401,"avatar_url":"https://avatars.githubusercontent.com/u/341401?v=3","gravatar_id":"","url":"https://api.github.com/users/yuriks","html_url":"https://github.com/yuriks","followers_url":"https://api.github.com/users/yuriks/followers","following_url":"https://api.github.com/users/yuriks/following{/other_user}","gists_url":"https://api.github.com/users/yuriks/gists{/gist_id}","starred_url":"https://api.github.com/users/yuriks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuriks/subscriptions","organizations_url":"https://api.github.com/users/yuriks/orgs","repos_url":"https://api.github.com/users/yuriks/repos","events_url":"https://api.github.com/users/yuriks/events{/privacy}","received_events_url":"https://api.github.com/users/yuriks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yuriks/citra","description":"Nintendo 3DS emulator/debugger","fork":true,"url":"https://api.github.com/repos/yuriks/citra","forks_url":"https://api.github.com/repos/yuriks/citra/forks","keys_url":"https://api.github.com/repos/yuriks/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuriks/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuriks/citra/teams","hooks_url":"https://api.github.com/repos/yuriks/citra/hooks","issue_events_url":"https://api.github.com/repos/yuriks/citra/issues/events{/number}","events_url":"https://api.github.com/repos/yuriks/citra/events","assignees_url":"https://api.github.com/repos/yuriks/citra/assignees{/user}","branches_url":"https://api.github.com/repos/yuriks/citra/branches{/branch}","tags_url":"https://api.github.com/repos/yuriks/citra/tags","blobs_url":"https://api.github.com/repos/yuriks/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuriks/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuriks/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuriks/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuriks/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/yuriks/citra/languages","stargazers_url":"https://api.github.com/repos/yuriks/citra/stargazers","contributors_url":"https://api.github.com/repos/yuriks/citra/contributors","subscribers_url":"https://api.github.com/repos/yuriks/citra/subscribers","subscription_url":"https://api.github.com/repos/yuriks/citra/subscription","commits_url":"https://api.github.com/repos/yuriks/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuriks/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuriks/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuriks/citra/issues/comments/{number}","contents_url":"https://api.github.com/repos/yuriks/citra/contents/{+path}","compare_url":"https://api.github.com/repos/yuriks/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuriks/citra/merges","archive_url":"https://api.github.com/repos/yuriks/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuriks/citra/downloads","issues_url":"https://api.github.com/repos/yuriks/citra/issues{/number}","pulls_url":"https://api.github.com/repos/yuriks/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/yuriks/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/yuriks/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuriks/citra/labels{/name}","releases_url":"https://api.github.com/repos/yuriks/citra/releases{/id}","created_at":"2014-07-19T20:23:37Z","updated_at":"2014-08-28T18:42:13Z","pushed_at":"2015-02-01T13:04:46Z","git_url":"git://github.com/yuriks/citra.git","ssh_url":"git@github.com:yuriks/citra.git","clone_url":"https://github.com/yuriks/citra.git","svn_url":"https://github.com/yuriks/citra","homepage":null,"size":7525,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"citra-emu:master","ref":"master","sha":"1a82721ad2f21b61479975bc338d047b11319cd0","user":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":19866730,"name":"citra","full_name":"citra-emu/citra","owner":{"login":"citra-emu","id":7605670,"avatar_url":"https://avatars.githubusercontent.com/u/7605670?v=3","gravatar_id":"","url":"https://api.github.com/users/citra-emu","html_url":"https://github.com/citra-emu","followers_url":"https://api.github.com/users/citra-emu/followers","following_url":"https://api.github.com/users/citra-emu/following{/other_user}","gists_url":"https://api.github.com/users/citra-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/citra-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citra-emu/subscriptions","organizations_url":"https://api.github.com/users/citra-emu/orgs","repos_url":"https://api.github.com/users/citra-emu/repos","events_url":"https://api.github.com/users/citra-emu/events{/privacy}","received_events_url":"https://api.github.com/users/citra-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citra-emu/citra","description":"Nintendo 3DS emulator/debugger","fork":false,"url":"https://api.github.com/repos/citra-emu/citra","forks_url":"https://api.github.com/repos/citra-emu/citra/forks","keys_url":"https://api.github.com/repos/citra-emu/citra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citra-emu/citra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citra-emu/citra/teams","hooks_url":"https://api.github.com/repos/citra-emu/citra/hooks","issue_events_url":"https://api.github.com/repos/citra-emu/citra/issues/events{/number}","events_url":"https://api.github.com/repos/citra-emu/citra/events","assignees_url":"https://api.github.com/repos/citra-emu/citra/assignees{/user}","branches_url":"https://api.github.com/repos/citra-emu/citra/branches{/branch}","tags_url":"https://api.github.com/repos/citra-emu/citra/tags","blobs_url":"https://api.github.com/repos/citra-emu/citra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citra-emu/citra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citra-emu/citra/git/refs{/sha}","trees_url":"https://api.github.com/repos/citra-emu/citra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citra-emu/citra/statuses/{sha}","languages_url":"https://api.github.com/repos/citra-emu/citra/languages","stargazers_url":"https://api.github.com/repos/citra-emu/citra/stargazers","contributors_url":"https://api.github.com/repos/citra-emu/citra/contributors","subscribers_url":"https://api.github.com/repos/citra-emu/citra/subscribers","subscription_url":"https://api.github.com/repos/citra-emu/citra/subscription","commits_url":"https://api.github.com/repos/citra-emu/citra/commits{/sha}","git_commits_url":"https://api.github.com/repos/citra-emu/citra/git/commits{/sha}","comments_url":"https://api.github.com/repos/citra-emu/citra/comments{/number}","issue_comment_url":"https://api.github.com/repos/citra-emu/citra/issues/comments/{number}","contents_url":"https://api.github.com/repos/citra-emu/citra/contents/{+path}","compare_url":"https://api.github.com/repos/citra-emu/citra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citra-emu/citra/merges","archive_url":"https://api.github.com/repos/citra-emu/citra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citra-emu/citra/downloads","issues_url":"https://api.github.com/repos/citra-emu/citra/issues{/number}","pulls_url":"https://api.github.com/repos/citra-emu/citra/pulls{/number}","milestones_url":"https://api.github.com/repos/citra-emu/citra/milestones{/number}","notifications_url":"https://api.github.com/repos/citra-emu/citra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citra-emu/citra/labels{/name}","releases_url":"https://api.github.com/repos/citra-emu/citra/releases{/id}","created_at":"2014-05-16T18:33:15Z","updated_at":"2015-02-01T11:04:54Z","pushed_at":"2015-02-01T11:00:12Z","git_url":"git://github.com/citra-emu/citra.git","ssh_url":"git@github.com:citra-emu/citra.git","clone_url":"https://github.com/citra-emu/citra.git","svn_url":"https://github.com/citra-emu/citra","homepage":null,"size":17666,"stargazers_count":534,"watchers_count":534,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":43,"forks":135,"open_issues":43,"watchers":534,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/523"},"html":{"href":"https://github.com/citra-emu/citra/pull/523"},"issue":{"href":"https://api.github.com/repos/citra-emu/citra/issues/523"},"comments":{"href":"https://api.github.com/repos/citra-emu/citra/issues/523/comments"},"review_comments":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/523/comments"},"review_comment":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/citra-emu/citra/pulls/523/commits"},"statuses":{"href":"https://api.github.com/repos/citra-emu/citra/statuses/33daa2c90e1a93cf6804d2c7d8fb767ce5155edd"}}}}