{"action":"created","comment":{"url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/comments/244644150","pull_request_review_id":188563753,"id":244644150,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDY0NDE1MA==","diff_hunk":"@@ -606,14 +632,81 @@ _NODISCARD _Success_(0 < return < strsz) inline auto __cdecl tcslen_s(_In_reads_\n /// <summary>\n /// Determines if <paramref name=\"sString\" /> starts with <paramref name=\"sMatch\" />.\n /// </summary>\n-GSL_SUPPRESS_F6\n-_NODISCARD bool StringStartsWith(_In_ const std::wstring& sString, _In_ const std::wstring& sMatch) noexcept;\n+template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>\n+GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const std::basic_string<CharT>& sString,\n+                                                 _In_ const std::basic_string<CharT>& sMatch) noexcept\n+{\n+    if (sMatch.length() > sString.length())\n+        return false;\n+\n+    return (sString.compare(0, sMatch.length(), sMatch) == 0);\n+}\n+\n+/// <summary>\n+/// Determines if <paramref name=\"sString\" /> starts with <paramref name=\"sMatch\" />.\n+/// </summary>\n+template<typename CharT, typename = std::enable_if_t<is_char_v<CharT>>>\n+GSL_SUPPRESS_F6 _NODISCARD bool StringStartsWith(_In_ const std::basic_string<CharT>& sString,\n+                                                 _In_ const CharT* restrict sMatch) noexcept\n+{\n+    if (tcslen_s(sMatch) > sString.length())","path":"src/RA_StringUtils.h","position":112,"original_position":112,"commit_id":"940c78cdf877113bd2278e84b6ac77743561b8e6","original_commit_id":"940c78cdf877113bd2278e84b6ac77743561b8e6","user":{"login":"Jamiras","id":32680403,"node_id":"MDQ6VXNlcjMyNjgwNDAz","avatar_url":"https://avatars1.githubusercontent.com/u/32680403?v=4","gravatar_id":"","url":"https://api.github.com/users/Jamiras","html_url":"https://github.com/Jamiras","followers_url":"https://api.github.com/users/Jamiras/followers","following_url":"https://api.github.com/users/Jamiras/following{/other_user}","gists_url":"https://api.github.com/users/Jamiras/gists{/gist_id}","starred_url":"https://api.github.com/users/Jamiras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jamiras/subscriptions","organizations_url":"https://api.github.com/users/Jamiras/orgs","repos_url":"https://api.github.com/users/Jamiras/repos","events_url":"https://api.github.com/users/Jamiras/events{/privacy}","received_events_url":"https://api.github.com/users/Jamiras/received_events","type":"User","site_admin":false},"body":"`tcslen_s` should be called once and stored in a variable instead of recalculated on line 655.","created_at":"2019-01-01T18:10:18Z","updated_at":"2019-01-01T18:11:29Z","html_url":"https://github.com/RetroAchievements/RAIntegration/pull/221#discussion_r244644150","pull_request_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/comments/244644150"},"html":{"href":"https://github.com/RetroAchievements/RAIntegration/pull/221#discussion_r244644150"},"pull_request":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221","id":240893247,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwODkzMjQ3","html_url":"https://github.com/RetroAchievements/RAIntegration/pull/221","diff_url":"https://github.com/RetroAchievements/RAIntegration/pull/221.diff","patch_url":"https://github.com/RetroAchievements/RAIntegration/pull/221.patch","issue_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues/221","number":221,"state":"open","locked":false,"title":"Cppcorecheck gsl rules","user":{"login":"SyrianBallaS","id":18649925,"node_id":"MDQ6VXNlcjE4NjQ5OTI1","avatar_url":"https://avatars2.githubusercontent.com/u/18649925?v=4","gravatar_id":"","url":"https://api.github.com/users/SyrianBallaS","html_url":"https://github.com/SyrianBallaS","followers_url":"https://api.github.com/users/SyrianBallaS/followers","following_url":"https://api.github.com/users/SyrianBallaS/following{/other_user}","gists_url":"https://api.github.com/users/SyrianBallaS/gists{/gist_id}","starred_url":"https://api.github.com/users/SyrianBallaS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SyrianBallaS/subscriptions","organizations_url":"https://api.github.com/users/SyrianBallaS/orgs","repos_url":"https://api.github.com/users/SyrianBallaS/repos","events_url":"https://api.github.com/users/SyrianBallaS/events{/privacy}","received_events_url":"https://api.github.com/users/SyrianBallaS/received_events","type":"User","site_admin":false},"body":"Even though it says GSL Rules it's actually a subset of the bounds profile. It's a bit more focused.\r\n\r\n**Rule Addressed:**\r\n`Bounds.4: Don't use standard-library functions and types that are not bounds-checked: Use the standard library in a type-safe manner.`\r\n\r\nProbably not gonna run the bounds profile soon until I get a better understanding of spans (non-owning array that does not decay into pointer).","created_at":"2018-12-25T21:04:23Z","updated_at":"2019-01-01T18:11:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0cec51a94dc51be5d94afe4dd428f5d570b7d646","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221/commits","review_comments_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221/comments","review_comment_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues/221/comments","statuses_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/statuses/940c78cdf877113bd2278e84b6ac77743561b8e6","head":{"label":"SyrianBallaS:cppcorecheck_gsl_rules","ref":"cppcorecheck_gsl_rules","sha":"940c78cdf877113bd2278e84b6ac77743561b8e6","user":{"login":"SyrianBallaS","id":18649925,"node_id":"MDQ6VXNlcjE4NjQ5OTI1","avatar_url":"https://avatars2.githubusercontent.com/u/18649925?v=4","gravatar_id":"","url":"https://api.github.com/users/SyrianBallaS","html_url":"https://github.com/SyrianBallaS","followers_url":"https://api.github.com/users/SyrianBallaS/followers","following_url":"https://api.github.com/users/SyrianBallaS/following{/other_user}","gists_url":"https://api.github.com/users/SyrianBallaS/gists{/gist_id}","starred_url":"https://api.github.com/users/SyrianBallaS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SyrianBallaS/subscriptions","organizations_url":"https://api.github.com/users/SyrianBallaS/orgs","repos_url":"https://api.github.com/users/SyrianBallaS/repos","events_url":"https://api.github.com/users/SyrianBallaS/events{/privacy}","received_events_url":"https://api.github.com/users/SyrianBallaS/received_events","type":"User","site_admin":false},"repo":{"id":129931605,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk5MzE2MDU=","name":"RAIntegration","full_name":"SyrianBallaS/RAIntegration","private":false,"owner":{"login":"SyrianBallaS","id":18649925,"node_id":"MDQ6VXNlcjE4NjQ5OTI1","avatar_url":"https://avatars2.githubusercontent.com/u/18649925?v=4","gravatar_id":"","url":"https://api.github.com/users/SyrianBallaS","html_url":"https://github.com/SyrianBallaS","followers_url":"https://api.github.com/users/SyrianBallaS/followers","following_url":"https://api.github.com/users/SyrianBallaS/following{/other_user}","gists_url":"https://api.github.com/users/SyrianBallaS/gists{/gist_id}","starred_url":"https://api.github.com/users/SyrianBallaS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SyrianBallaS/subscriptions","organizations_url":"https://api.github.com/users/SyrianBallaS/orgs","repos_url":"https://api.github.com/users/SyrianBallaS/repos","events_url":"https://api.github.com/users/SyrianBallaS/events{/privacy}","received_events_url":"https://api.github.com/users/SyrianBallaS/received_events","type":"User","site_admin":false},"html_url":"https://github.com/SyrianBallaS/RAIntegration","description":"The DLL responsible to integrate emulators with RetroAchievements.org","fork":true,"url":"https://api.github.com/repos/SyrianBallaS/RAIntegration","forks_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/forks","keys_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/teams","hooks_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/hooks","issue_events_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/issues/events{/number}","events_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/events","assignees_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/assignees{/user}","branches_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/branches{/branch}","tags_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/tags","blobs_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/git/refs{/sha}","trees_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/statuses/{sha}","languages_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/languages","stargazers_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/stargazers","contributors_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/contributors","subscribers_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/subscribers","subscription_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/subscription","commits_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/commits{/sha}","git_commits_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/git/commits{/sha}","comments_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/comments{/number}","issue_comment_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/issues/comments{/number}","contents_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/contents/{+path}","compare_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/merges","archive_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/downloads","issues_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/issues{/number}","pulls_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/pulls{/number}","milestones_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/milestones{/number}","notifications_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/labels{/name}","releases_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/releases{/id}","deployments_url":"https://api.github.com/repos/SyrianBallaS/RAIntegration/deployments","created_at":"2018-04-17T16:09:30Z","updated_at":"2018-12-28T13:12:35Z","pushed_at":"2018-12-31T02:37:33Z","git_url":"git://github.com/SyrianBallaS/RAIntegration.git","ssh_url":"git@github.com:SyrianBallaS/RAIntegration.git","clone_url":"https://github.com/SyrianBallaS/RAIntegration.git","svn_url":"https://github.com/SyrianBallaS/RAIntegration","homepage":"http://retroachievements.org","size":3456,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"RetroAchievements:master","ref":"master","sha":"cdfe662d3b902eb54bfc891ee920eee9e4b51635","user":{"login":"RetroAchievements","id":5411318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MTEzMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/5411318?v=4","gravatar_id":"","url":"https://api.github.com/users/RetroAchievements","html_url":"https://github.com/RetroAchievements","followers_url":"https://api.github.com/users/RetroAchievements/followers","following_url":"https://api.github.com/users/RetroAchievements/following{/other_user}","gists_url":"https://api.github.com/users/RetroAchievements/gists{/gist_id}","starred_url":"https://api.github.com/users/RetroAchievements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RetroAchievements/subscriptions","organizations_url":"https://api.github.com/users/RetroAchievements/orgs","repos_url":"https://api.github.com/users/RetroAchievements/repos","events_url":"https://api.github.com/users/RetroAchievements/events{/privacy}","received_events_url":"https://api.github.com/users/RetroAchievements/received_events","type":"Organization","site_admin":false},"repo":{"id":129603848,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk2MDM4NDg=","name":"RAIntegration","full_name":"RetroAchievements/RAIntegration","private":false,"owner":{"login":"RetroAchievements","id":5411318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0MTEzMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/5411318?v=4","gravatar_id":"","url":"https://api.github.com/users/RetroAchievements","html_url":"https://github.com/RetroAchievements","followers_url":"https://api.github.com/users/RetroAchievements/followers","following_url":"https://api.github.com/users/RetroAchievements/following{/other_user}","gists_url":"https://api.github.com/users/RetroAchievements/gists{/gist_id}","starred_url":"https://api.github.com/users/RetroAchievements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RetroAchievements/subscriptions","organizations_url":"https://api.github.com/users/RetroAchievements/orgs","repos_url":"https://api.github.com/users/RetroAchievements/repos","events_url":"https://api.github.com/users/RetroAchievements/events{/privacy}","received_events_url":"https://api.github.com/users/RetroAchievements/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/RetroAchievements/RAIntegration","description":"The DLL responsible to integrate emulators with RetroAchievements.org","fork":false,"url":"https://api.github.com/repos/RetroAchievements/RAIntegration","forks_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/forks","keys_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/teams","hooks_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/hooks","issue_events_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues/events{/number}","events_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/events","assignees_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/assignees{/user}","branches_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/branches{/branch}","tags_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/tags","blobs_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/git/refs{/sha}","trees_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/statuses/{sha}","languages_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/languages","stargazers_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/stargazers","contributors_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/contributors","subscribers_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/subscribers","subscription_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/subscription","commits_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/commits{/sha}","git_commits_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/git/commits{/sha}","comments_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/comments{/number}","issue_comment_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues/comments{/number}","contents_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/contents/{+path}","compare_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/merges","archive_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/downloads","issues_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues{/number}","pulls_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls{/number}","milestones_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/milestones{/number}","notifications_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/labels{/name}","releases_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/releases{/id}","deployments_url":"https://api.github.com/repos/RetroAchievements/RAIntegration/deployments","created_at":"2018-04-15T11:33:17Z","updated_at":"2018-12-26T23:21:20Z","pushed_at":"2018-12-31T02:37:34Z","git_url":"git://github.com/RetroAchievements/RAIntegration.git","ssh_url":"git@github.com:RetroAchievements/RAIntegration.git","clone_url":"https://github.com/RetroAchievements/RAIntegration.git","svn_url":"https://github.com/RetroAchievements/RAIntegration","homepage":"http://retroachievements.org","size":3317,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":59,"license":null,"forks":5,"open_issues":59,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221"},"html":{"href":"https://github.com/RetroAchievements/RAIntegration/pull/221"},"issue":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues/221"},"comments":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/RetroAchievements/RAIntegration/statuses/940c78cdf877113bd2278e84b6ac77743561b8e6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Jamiras"}}