Windows: Fix warning C4458: declaration of 'method' hides class member

This commit is contained in:
Marshall Greenblatt 2020-10-15 12:39:41 -04:00
parent 9e296bde3c
commit e618f44667
1 changed files with 5 additions and 5 deletions

View File

@ -1496,16 +1496,16 @@ struct PostResource : CookieResource {
if (expected_origin != origin) if (expected_origin != origin)
return false; return false;
const std::string& method = request->GetMethod(); const std::string& req_method = request->GetMethod();
const bool has_post_data = request->GetPostData() != nullptr; const bool has_post_data = request->GetPostData() != nullptr;
if (expect_downgrade_to_get) { if (expect_downgrade_to_get) {
EXPECT_FALSE(has_post_data) << GetPathURL(); EXPECT_FALSE(has_post_data) << GetPathURL();
EXPECT_STREQ("GET", method.c_str()) << GetPathURL(); EXPECT_STREQ("GET", req_method.c_str()) << GetPathURL();
return !has_post_data && method == "GET"; return !has_post_data && req_method == "GET";
} else { } else {
EXPECT_TRUE(has_post_data) << GetPathURL(); EXPECT_TRUE(has_post_data) << GetPathURL();
EXPECT_STREQ("POST", method.c_str()) << GetPathURL(); EXPECT_STREQ("POST", req_method.c_str()) << GetPathURL();
return has_post_data && method == "POST"; return has_post_data && req_method == "POST";
} }
} }
}; };