{"action":"created","comment":{"url":"https://api.github.com/repos/performous/performous/pulls/comments/200247139","pull_request_review_id":134523632,"id":200247139,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDI0NzEzOQ==","diff_hunk":"@@ -381,7 +403,21 @@ void Songs::sortChange(int diff) {\n \tif (m_order < 0) m_order += orders;\n \tRestoreSel restore(*this);\n \tconfig[\"songs/sort-order\"].i() = m_order;\n+\tswitch (m_order) {\n+\t\tcase 1:","path":"game/songs.cc","position":87,"original_position":87,"commit_id":"40a3edee896e242a787bf448a6d03497612e7cfc","original_commit_id":"40a3edee896e242a787bf448a6d03497612e7cfc","user":{"login":"Lord-Kamina","id":6446892,"node_id":"MDQ6VXNlcjY0NDY4OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/6446892?v=4","gravatar_id":"","url":"https://api.github.com/users/Lord-Kamina","html_url":"https://github.com/Lord-Kamina","followers_url":"https://api.github.com/users/Lord-Kamina/followers","following_url":"https://api.github.com/users/Lord-Kamina/following{/other_user}","gists_url":"https://api.github.com/users/Lord-Kamina/gists{/gist_id}","starred_url":"https://api.github.com/users/Lord-Kamina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lord-Kamina/subscriptions","organizations_url":"https://api.github.com/users/Lord-Kamina/orgs","repos_url":"https://api.github.com/users/Lord-Kamina/repos","events_url":"https://api.github.com/users/Lord-Kamina/events{/privacy}","received_events_url":"https://api.github.com/users/Lord-Kamina/received_events","type":"User","site_admin":false},"body":"Should I use ```[[fallthrough]]```? (will that work, being c++17?) or literally ```//fallthrough```","created_at":"2018-07-05T06:47:56Z","updated_at":"2018-07-05T06:47:56Z","html_url":"https://github.com/performous/performous/pull/388#discussion_r200247139","pull_request_url":"https://api.github.com/repos/performous/performous/pulls/388","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/performous/performous/pulls/comments/200247139"},"html":{"href":"https://github.com/performous/performous/pull/388#discussion_r200247139"},"pull_request":{"href":"https://api.github.com/repos/performous/performous/pulls/388"}},"in_reply_to_id":200245693},"pull_request":{"url":"https://api.github.com/repos/performous/performous/pulls/388","id":199349799,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MzQ5Nzk5","html_url":"https://github.com/performous/performous/pull/388","diff_url":"https://github.com/performous/performous/pull/388.diff","patch_url":"https://github.com/performous/performous/pull/388.patch","issue_url":"https://api.github.com/repos/performous/performous/issues/388","number":388,"state":"open","locked":false,"title":"Overhaul UnicodeUtil, sorting, and a couple more things.","user":{"login":"Lord-Kamina","id":6446892,"node_id":"MDQ6VXNlcjY0NDY4OTI=","avatar_url":"https://avatars2.githubusercontent.com/u/6446892?v=4","gravatar_id":"","url":"https://api.github.com/users/Lord-Kamina","html_url":"https://github.com/Lord-Kamina","followers_url":"https://api.github.com/users/Lord-Kamina/followers","following_url":"https://api.github.com/users/Lord-Kamina/following{/other_user}","gists_url":"https://api.github.com/users/Lord-Kamina/gists{/gist_id}","starred_url":"https://api.github.com/users/Lord-Kamina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lord-Kamina/subscriptions","organizations_url":"https://api.github.com/users/Lord-Kamina/orgs","repos_url":"https://api.github.com/users/Lord-Kamina/repos","events_url":"https://api.github.com/users/Lord-Kamina/events{/privacy}","received_events_url":"https://api.github.com/users/Lord-Kamina/received_events","type":"User","site_admin":false},"body":"<!--\r\nPLEASE READ THIS MESSAGE.\r\n\r\nHOW TO WRITE A GOOD PULL REQUEST?\r\n\r\n- Make it small.\r\n- Do only one thing.\r\n- Avoid re-formatting.\r\n- Make sure the code builds.\r\n- Write useful descriptions and titles.\r\n- Address review comments in terms of additional commits.\r\n- Do not amend/squash existing ones unless the PR is trivial.\r\n- Read the contributing guide: https://github.com/performous/performous/blob/master/.github/CONTRIBUTING.md.\r\n\r\n-->\r\n\r\n### What does this PR do?\r\n\r\nOk, this is a big one...\r\n\r\nThe most important change in this PR is an almost complete rewrite of the UnicodeUtil class:\r\n- All methods are now static.\r\n- Introduced Google's CED library (as a statically-linked submodule) exclusively for charset detection, since it's much more accurate than  ICU for that specific function.\r\n- Implemented locale-aware sorting, the user should now be able to choose between secondary (takes into account accents, umlauts and such) and tertiary (same, plus also takes into account caps) collation for sorting.\r\n- Rewrote the artist and title collation algorithms used for sorting; specifically, fields are now separated with \"__\" in the collation string, just to make sure not to sort across more than one field (which could be the case when using spaces or nothing)\r\n- Articles such as \"The\", \"A\" at the beginning of an Artist or Title are now ignored when sorting: \"The Police\" would become \"Police,The\". I've added those two for English as well as four more for Spanish. They live in the schema, feel free to add more for more languages if you so desire.\r\n   - This was actually implemented earlier, but it was broken. It's working properly now.\r\n- Restored the signature of ```writeConfig``` to once be ```void writeConfig(bool system);```\r\n- Added a hack so the audio subsystem is only reinitialized when saving settings if the value has actually been changed.\r\n- Now sorting criteria for songs is saved immediately when it's changed in the song selection menu.\r\n\r\n<!-- A brief description of the change being made with this pull request. -->\r\n\r\n### Closes Issue(s)\r\n\r\n<!-- List here all the issues closed by this pull request. -->\r\n\r\n### Motivation\r\n\r\nMost of the things I changed were clunky or just plain broken.\r\n\r\n<!-- What inspired you to submit this pull request? -->\r\n\r\n\r\n### More\r\n\r\n- [ ] Added/updated documentation\r\n\r\n### Additional Notes\r\n\r\nTODO (hate me): We should update translation files.\r\n\r\n<!-- Anything else we should know when reviewing? -->\r\n","created_at":"2018-07-05T03:10:22Z","updated_at":"2018-07-05T06:47:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02345320fdc2b475d4ad6b94be2dff81ac99764f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Baklap4","id":3918517,"node_id":"MDQ6VXNlcjM5MTg1MTc=","avatar_url":"https://avatars0.githubusercontent.com/u/3918517?v=4","gravatar_id":"","url":"https://api.github.com/users/Baklap4","html_url":"https://github.com/Baklap4","followers_url":"https://api.github.com/users/Baklap4/followers","following_url":"https://api.github.com/users/Baklap4/following{/other_user}","gists_url":"https://api.github.com/users/Baklap4/gists{/gist_id}","starred_url":"https://api.github.com/users/Baklap4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baklap4/subscriptions","organizations_url":"https://api.github.com/users/Baklap4/orgs","repos_url":"https://api.github.com/users/Baklap4/repos","events_url":"https://api.github.com/users/Baklap4/events{/privacy}","received_events_url":"https://api.github.com/users/Baklap4/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/performous/performous/pulls/388/commits","review_comments_url":"https://api.github.com/repos/performous/performous/pulls/388/comments","review_comment_url":"https://api.github.com/repos/performous/performous/pulls/comments{/number}","comments_url":"https://api.github.com/repos/performous/performous/issues/388/comments","statuses_url":"https://api.github.com/repos/performous/performous/statuses/40a3edee896e242a787bf448a6d03497612e7cfc","head":{"label":"performous:bug-fix/unicode","ref":"bug-fix/unicode","sha":"40a3edee896e242a787bf448a6d03497612e7cfc","user":{"login":"performous","id":2807979,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MDc5Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2807979?v=4","gravatar_id":"","url":"https://api.github.com/users/performous","html_url":"https://github.com/performous","followers_url":"https://api.github.com/users/performous/followers","following_url":"https://api.github.com/users/performous/following{/other_user}","gists_url":"https://api.github.com/users/performous/gists{/gist_id}","starred_url":"https://api.github.com/users/performous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/performous/subscriptions","organizations_url":"https://api.github.com/users/performous/orgs","repos_url":"https://api.github.com/users/performous/repos","events_url":"https://api.github.com/users/performous/events{/privacy}","received_events_url":"https://api.github.com/users/performous/received_events","type":"Organization","site_admin":false},"repo":{"id":6711770,"node_id":"MDEwOlJlcG9zaXRvcnk2NzExNzcw","name":"performous","full_name":"performous/performous","owner":{"login":"performous","id":2807979,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MDc5Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2807979?v=4","gravatar_id":"","url":"https://api.github.com/users/performous","html_url":"https://github.com/performous","followers_url":"https://api.github.com/users/performous/followers","following_url":"https://api.github.com/users/performous/following{/other_user}","gists_url":"https://api.github.com/users/performous/gists{/gist_id}","starred_url":"https://api.github.com/users/performous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/performous/subscriptions","organizations_url":"https://api.github.com/users/performous/orgs","repos_url":"https://api.github.com/users/performous/repos","events_url":"https://api.github.com/users/performous/events{/privacy}","received_events_url":"https://api.github.com/users/performous/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/performous/performous","description":"An open-source music and rhythm game.","fork":false,"url":"https://api.github.com/repos/performous/performous","forks_url":"https://api.github.com/repos/performous/performous/forks","keys_url":"https://api.github.com/repos/performous/performous/keys{/key_id}","collaborators_url":"https://api.github.com/repos/performous/performous/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/performous/performous/teams","hooks_url":"https://api.github.com/repos/performous/performous/hooks","issue_events_url":"https://api.github.com/repos/performous/performous/issues/events{/number}","events_url":"https://api.github.com/repos/performous/performous/events","assignees_url":"https://api.github.com/repos/performous/performous/assignees{/user}","branches_url":"https://api.github.com/repos/performous/performous/branches{/branch}","tags_url":"https://api.github.com/repos/performous/performous/tags","blobs_url":"https://api.github.com/repos/performous/performous/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/performous/performous/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/performous/performous/git/refs{/sha}","trees_url":"https://api.github.com/repos/performous/performous/git/trees{/sha}","statuses_url":"https://api.github.com/repos/performous/performous/statuses/{sha}","languages_url":"https://api.github.com/repos/performous/performous/languages","stargazers_url":"https://api.github.com/repos/performous/performous/stargazers","contributors_url":"https://api.github.com/repos/performous/performous/contributors","subscribers_url":"https://api.github.com/repos/performous/performous/subscribers","subscription_url":"https://api.github.com/repos/performous/performous/subscription","commits_url":"https://api.github.com/repos/performous/performous/commits{/sha}","git_commits_url":"https://api.github.com/repos/performous/performous/git/commits{/sha}","comments_url":"https://api.github.com/repos/performous/performous/comments{/number}","issue_comment_url":"https://api.github.com/repos/performous/performous/issues/comments{/number}","contents_url":"https://api.github.com/repos/performous/performous/contents/{+path}","compare_url":"https://api.github.com/repos/performous/performous/compare/{base}...{head}","merges_url":"https://api.github.com/repos/performous/performous/merges","archive_url":"https://api.github.com/repos/performous/performous/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/performous/performous/downloads","issues_url":"https://api.github.com/repos/performous/performous/issues{/number}","pulls_url":"https://api.github.com/repos/performous/performous/pulls{/number}","milestones_url":"https://api.github.com/repos/performous/performous/milestones{/number}","notifications_url":"https://api.github.com/repos/performous/performous/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/performous/performous/labels{/name}","releases_url":"https://api.github.com/repos/performous/performous/releases{/id}","deployments_url":"https://api.github.com/repos/performous/performous/deployments","created_at":"2012-11-15T21:11:21Z","updated_at":"2018-07-01T10:52:51Z","pushed_at":"2018-07-05T03:10:23Z","git_url":"git://github.com/performous/performous.git","ssh_url":"git@github.com:performous/performous.git","clone_url":"https://github.com/performous/performous.git","svn_url":"https://github.com/performous/performous","homepage":"http://performous.org/","size":16927,"stargazers_count":196,"watchers_count":196,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":69,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":71,"open_issues":69,"watchers":196,"default_branch":"master"}},"base":{"label":"performous:master","ref":"master","sha":"2aa07cd90d1120ec61f9e6d42208798635c62d09","user":{"login":"performous","id":2807979,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MDc5Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2807979?v=4","gravatar_id":"","url":"https://api.github.com/users/performous","html_url":"https://github.com/performous","followers_url":"https://api.github.com/users/performous/followers","following_url":"https://api.github.com/users/performous/following{/other_user}","gists_url":"https://api.github.com/users/performous/gists{/gist_id}","starred_url":"https://api.github.com/users/performous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/performous/subscriptions","organizations_url":"https://api.github.com/users/performous/orgs","repos_url":"https://api.github.com/users/performous/repos","events_url":"https://api.github.com/users/performous/events{/privacy}","received_events_url":"https://api.github.com/users/performous/received_events","type":"Organization","site_admin":false},"repo":{"id":6711770,"node_id":"MDEwOlJlcG9zaXRvcnk2NzExNzcw","name":"performous","full_name":"performous/performous","owner":{"login":"performous","id":2807979,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MDc5Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/2807979?v=4","gravatar_id":"","url":"https://api.github.com/users/performous","html_url":"https://github.com/performous","followers_url":"https://api.github.com/users/performous/followers","following_url":"https://api.github.com/users/performous/following{/other_user}","gists_url":"https://api.github.com/users/performous/gists{/gist_id}","starred_url":"https://api.github.com/users/performous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/performous/subscriptions","organizations_url":"https://api.github.com/users/performous/orgs","repos_url":"https://api.github.com/users/performous/repos","events_url":"https://api.github.com/users/performous/events{/privacy}","received_events_url":"https://api.github.com/users/performous/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/performous/performous","description":"An open-source music and rhythm game.","fork":false,"url":"https://api.github.com/repos/performous/performous","forks_url":"https://api.github.com/repos/performous/performous/forks","keys_url":"https://api.github.com/repos/performous/performous/keys{/key_id}","collaborators_url":"https://api.github.com/repos/performous/performous/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/performous/performous/teams","hooks_url":"https://api.github.com/repos/performous/performous/hooks","issue_events_url":"https://api.github.com/repos/performous/performous/issues/events{/number}","events_url":"https://api.github.com/repos/performous/performous/events","assignees_url":"https://api.github.com/repos/performous/performous/assignees{/user}","branches_url":"https://api.github.com/repos/performous/performous/branches{/branch}","tags_url":"https://api.github.com/repos/performous/performous/tags","blobs_url":"https://api.github.com/repos/performous/performous/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/performous/performous/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/performous/performous/git/refs{/sha}","trees_url":"https://api.github.com/repos/performous/performous/git/trees{/sha}","statuses_url":"https://api.github.com/repos/performous/performous/statuses/{sha}","languages_url":"https://api.github.com/repos/performous/performous/languages","stargazers_url":"https://api.github.com/repos/performous/performous/stargazers","contributors_url":"https://api.github.com/repos/performous/performous/contributors","subscribers_url":"https://api.github.com/repos/performous/performous/subscribers","subscription_url":"https://api.github.com/repos/performous/performous/subscription","commits_url":"https://api.github.com/repos/performous/performous/commits{/sha}","git_commits_url":"https://api.github.com/repos/performous/performous/git/commits{/sha}","comments_url":"https://api.github.com/repos/performous/performous/comments{/number}","issue_comment_url":"https://api.github.com/repos/performous/performous/issues/comments{/number}","contents_url":"https://api.github.com/repos/performous/performous/contents/{+path}","compare_url":"https://api.github.com/repos/performous/performous/compare/{base}...{head}","merges_url":"https://api.github.com/repos/performous/performous/merges","archive_url":"https://api.github.com/repos/performous/performous/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/performous/performous/downloads","issues_url":"https://api.github.com/repos/performous/performous/issues{/number}","pulls_url":"https://api.github.com/repos/performous/performous/pulls{/number}","milestones_url":"https://api.github.com/repos/performous/performous/milestones{/number}","notifications_url":"https://api.github.com/repos/performous/performous/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/performous/performous/labels{/name}","releases_url":"https://api.github.com/repos/performous/performous/releases{/id}","deployments_url":"https://api.github.com/repos/performous/performous/deployments","created_at":"2012-11-15T21:11:21Z","updated_at":"2018-07-01T10:52:51Z","pushed_at":"2018-07-05T03:10:23Z","git_url":"git://github.com/performous/performous.git","ssh_url":"git@github.com:performous/performous.git","clone_url":"https://github.com/performous/performous.git","svn_url":"https://github.com/performous/performous","homepage":"http://performous.org/","size":16927,"stargazers_count":196,"watchers_count":196,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":69,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":71,"open_issues":69,"watchers":196,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/performous/performous/pulls/388"},"html":{"href":"https://github.com/performous/performous/pull/388"},"issue":{"href":"https://api.github.com/repos/performous/performous/issues/388"},"comments":{"href":"https://api.github.com/repos/performous/performous/issues/388/comments"},"review_comments":{"href":"https://api.github.com/repos/performous/performous/pulls/388/comments"},"review_comment":{"href":"https://api.github.com/repos/performous/performous/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/performous/performous/pulls/388/commits"},"statuses":{"href":"https://api.github.com/repos/performous/performous/statuses/40a3edee896e242a787bf448a6d03497612e7cfc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Lord-Kamina"}}