Skip to content

Commit 9f48c86

Browse files
committed
Removing usage of deprecated password() API in a test case.
1 parent 7205a59 commit 9f48c86

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Release/include/cpprest/web_utilities.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,16 @@ class credentials
9393
/// </summary>
9494
/// <param name="username">User name as a string.</param>
9595
/// <param name="password">Password as a string.</param>
96-
credentials(utility::string_t username, const utility::string_t &password) :
96+
credentials(utility::string_t username, const utility::string_t &
97+
#if defined(_MS_WINDOWS)
98+
password
99+
#endif
100+
) :
97101
m_username(std::move(username))
98102
#if defined(_MS_WINDOWS)
99103
, m_password(password)
100104
#endif
101-
{
102-
// Avoid unreferenced parameter warning.
103-
password;
104-
}
105+
{}
105106

106107
/// <summary>
107108
/// The user name associated with the credentials.

Release/tests/functional/websockets/client/client_construction.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ TEST_FIXTURE(uri_address, get_client_config)
7878

7979
const websocket_client_config& config2 = client.config();
8080
VERIFY_ARE_EQUAL(config2.credentials().username(), cred.username());
81-
VERIFY_ARE_EQUAL(config2.credentials().password(), cred.password());
8281
}
8382

8483
// Verify that we can get the baseuri from websocket_client connect.

0 commit comments

Comments
 (0)