{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/40506789","id":40506789,"diff_hunk":"@@ -37,20 +32,17 @@ static std::vector<std::string> FileSearchWithTest(const std::vector<std::string\n \treturn result;\n }\n \n-std::vector<std::string> DoFileSearch(const std::vector<std::string>& globs, const std::vector<std::string>& directories, bool recursive)\n+std::vector<std::string> DoFileSearch(const std::vector<std::string>& exts, const std::vector<std::string>& directories, bool recursive)\n {\n-\tstd::string regex_str = \"^(\";\n-\tfor (const auto& str : globs)\n-\t{\n-\t\tif (regex_str.size() != 2)\n-\t\t\tregex_str += \"|\";\n-\t\t// convert glob to regex\n-\t\tregex_str += std::regex_replace(std::regex_replace(str, std::regex(\"\\\\.\"), \"\\\\.\"), std::regex(\"\\\\*\"), \".*\");\n-\t}\n-\tregex_str += \")$\";\n-\tstd::regex regex(regex_str, std::regex_constants::icase);\n+\tbool accept_all = std::find(exts.begin(), exts.end(), \"\") != exts.end();\n \treturn FileSearchWithTest(directories, recursive, [&](const File::FSTEntry& entry) {\n-\t\treturn std::regex_match(entry.virtualName, regex);\n+\t\tif (accept_all)\n+\t\t\treturn true;\n+\t\tstd::string name = entry.virtualName;\n+\t\tstd::transform(name.begin(), name.end(), name.begin(), ::tolower);\n+\t\treturn std::any_of(exts.begin(), exts.end(), [&](std::string ext) {","path":"Source/Core/Common/FileSearch.cpp","position":38,"original_position":38,"commit_id":"110987b761e7be9d846552d1f96518e896ec473e","original_commit_id":"110987b761e7be9d846552d1f96518e896ec473e","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":"const reference","created_at":"2015-09-27T17:20:43Z","updated_at":"2015-09-27T17:20:43Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/3075#discussion_r40506789","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/40506789"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3075#discussion_r40506789"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075","id":45615585,"html_url":"https://github.com/dolphin-emu/dolphin/pull/3075","diff_url":"https://github.com/dolphin-emu/dolphin/pull/3075.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/3075.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3075","number":3075,"state":"open","locked":false,"title":"FileSearch: Don't use RegExes, just do string comparisons.","user":{"login":"waddlesplash","id":2175324,"avatar_url":"https://avatars.githubusercontent.com/u/2175324?v=3","gravatar_id":"","url":"https://api.github.com/users/waddlesplash","html_url":"https://github.com/waddlesplash","followers_url":"https://api.github.com/users/waddlesplash/followers","following_url":"https://api.github.com/users/waddlesplash/following{/other_user}","gists_url":"https://api.github.com/users/waddlesplash/gists{/gist_id}","starred_url":"https://api.github.com/users/waddlesplash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waddlesplash/subscriptions","organizations_url":"https://api.github.com/users/waddlesplash/orgs","repos_url":"https://api.github.com/users/waddlesplash/repos","events_url":"https://api.github.com/users/waddlesplash/events{/privacy}","received_events_url":"https://api.github.com/users/waddlesplash/received_events","type":"User","site_admin":false},"body":"Nothing used the RegEx feature of FileSearch, and GCC < 4.9 doesn't support C++11 RegEx properly, so get rid of it.\r\n\r\nCC @comex as he wrote the feature & @lioncash for code review","created_at":"2015-09-22T00:08:23Z","updated_at":"2015-09-27T17:20:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5eeee4b4ee02891ce5eed3219c6e2c98ad31a737","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075/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/3075/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/110987b761e7be9d846552d1f96518e896ec473e","head":{"label":"waddlesplash:no-regexp","ref":"no-regexp","sha":"110987b761e7be9d846552d1f96518e896ec473e","user":{"login":"waddlesplash","id":2175324,"avatar_url":"https://avatars.githubusercontent.com/u/2175324?v=3","gravatar_id":"","url":"https://api.github.com/users/waddlesplash","html_url":"https://github.com/waddlesplash","followers_url":"https://api.github.com/users/waddlesplash/followers","following_url":"https://api.github.com/users/waddlesplash/following{/other_user}","gists_url":"https://api.github.com/users/waddlesplash/gists{/gist_id}","starred_url":"https://api.github.com/users/waddlesplash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waddlesplash/subscriptions","organizations_url":"https://api.github.com/users/waddlesplash/orgs","repos_url":"https://api.github.com/users/waddlesplash/repos","events_url":"https://api.github.com/users/waddlesplash/events{/privacy}","received_events_url":"https://api.github.com/users/waddlesplash/received_events","type":"User","site_admin":false},"repo":{"id":23736753,"name":"dolphin","full_name":"waddlesplash/dolphin","owner":{"login":"waddlesplash","id":2175324,"avatar_url":"https://avatars.githubusercontent.com/u/2175324?v=3","gravatar_id":"","url":"https://api.github.com/users/waddlesplash","html_url":"https://github.com/waddlesplash","followers_url":"https://api.github.com/users/waddlesplash/followers","following_url":"https://api.github.com/users/waddlesplash/following{/other_user}","gists_url":"https://api.github.com/users/waddlesplash/gists{/gist_id}","starred_url":"https://api.github.com/users/waddlesplash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waddlesplash/subscriptions","organizations_url":"https://api.github.com/users/waddlesplash/orgs","repos_url":"https://api.github.com/users/waddlesplash/repos","events_url":"https://api.github.com/users/waddlesplash/events{/privacy}","received_events_url":"https://api.github.com/users/waddlesplash/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/waddlesplash/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/waddlesplash/dolphin","forks_url":"https://api.github.com/repos/waddlesplash/dolphin/forks","keys_url":"https://api.github.com/repos/waddlesplash/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/waddlesplash/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/waddlesplash/dolphin/teams","hooks_url":"https://api.github.com/repos/waddlesplash/dolphin/hooks","issue_events_url":"https://api.github.com/repos/waddlesplash/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/waddlesplash/dolphin/events","assignees_url":"https://api.github.com/repos/waddlesplash/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/waddlesplash/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/waddlesplash/dolphin/tags","blobs_url":"https://api.github.com/repos/waddlesplash/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/waddlesplash/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/waddlesplash/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/waddlesplash/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/waddlesplash/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/waddlesplash/dolphin/languages","stargazers_url":"https://api.github.com/repos/waddlesplash/dolphin/stargazers","contributors_url":"https://api.github.com/repos/waddlesplash/dolphin/contributors","subscribers_url":"https://api.github.com/repos/waddlesplash/dolphin/subscribers","subscription_url":"https://api.github.com/repos/waddlesplash/dolphin/subscription","commits_url":"https://api.github.com/repos/waddlesplash/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/waddlesplash/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/waddlesplash/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/waddlesplash/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/waddlesplash/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/waddlesplash/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/waddlesplash/dolphin/merges","archive_url":"https://api.github.com/repos/waddlesplash/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/waddlesplash/dolphin/downloads","issues_url":"https://api.github.com/repos/waddlesplash/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/waddlesplash/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/waddlesplash/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/waddlesplash/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/waddlesplash/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/waddlesplash/dolphin/releases{/id}","created_at":"2014-09-06T14:43:14Z","updated_at":"2014-09-12T00:23:46Z","pushed_at":"2015-09-27T17:17:10Z","git_url":"git://github.com/waddlesplash/dolphin.git","ssh_url":"git@github.com:waddlesplash/dolphin.git","clone_url":"https://github.com/waddlesplash/dolphin.git","svn_url":"https://github.com/waddlesplash/dolphin","homepage":null,"size":225238,"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":"dolphin-emu:master","ref":"master","sha":"ce493b897d6d3735c930a8465cc0c26bbe5feb86","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-09-27T15:39:28Z","pushed_at":"2015-09-27T17:17:10Z","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":309747,"stargazers_count":1666,"watchers_count":1666,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":520,"mirror_url":null,"open_issues_count":81,"forks":520,"open_issues":81,"watchers":1666,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3075"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3075"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3075/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3075/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/3075/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/110987b761e7be9d846552d1f96518e896ec473e"}}}}