From 7674be40d610f3d38eae5fafd452a646920a394d Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 15 Oct 2020 12:39:41 -0400 Subject: [PATCH] Windows: Fix warning C4458: declaration of 'method' hides class member --- tests/ceftests/cors_unittest.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/ceftests/cors_unittest.cc b/tests/ceftests/cors_unittest.cc index 827b6452b..a0b334e2c 100644 --- a/tests/ceftests/cors_unittest.cc +++ b/tests/ceftests/cors_unittest.cc @@ -1496,16 +1496,16 @@ struct PostResource : CookieResource { if (expected_origin != origin) return false; - const std::string& method = request->GetMethod(); + const std::string& req_method = request->GetMethod(); const bool has_post_data = request->GetPostData() != nullptr; if (expect_downgrade_to_get) { EXPECT_FALSE(has_post_data) << GetPathURL(); - EXPECT_STREQ("GET", method.c_str()) << GetPathURL(); - return !has_post_data && method == "GET"; + EXPECT_STREQ("GET", req_method.c_str()) << GetPathURL(); + return !has_post_data && req_method == "GET"; } else { EXPECT_TRUE(has_post_data) << GetPathURL(); - EXPECT_STREQ("POST", method.c_str()) << GetPathURL(); - return has_post_data && method == "POST"; + EXPECT_STREQ("POST", req_method.c_str()) << GetPathURL(); + return has_post_data && req_method == "POST"; } } };