Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 03a6d47

Browse files
committed
Resolve PR comments
1 parent d4c4495 commit 03a6d47

File tree

1 file changed

+4
-6
lines changed
  • Microsoft.WindowsAzure.Storage/includes/was

1 file changed

+4
-6
lines changed

Microsoft.WindowsAzure.Storage/includes/was/core.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,17 @@ namespace azure { namespace storage {
233233
/// </summary>
234234
/// <param name="account_name">A string containing the name of the storage account.</param>
235235
/// <param name="account_key">A string containing the Base64-encoded account access key.</param>
236-
storage_credentials(utility::string_t account_name, const utility::string_t& account_key) : m_account_name(std::move(account_name)), m_account_key_credential(std::make_shared<account_key_credential>())
236+
storage_credentials(utility::string_t account_name, const utility::string_t& account_key) : m_account_name(std::move(account_name)), m_account_key_credential(std::make_shared<account_key_credential>(utility::conversions::from_base64(account_key)))
237237
{
238-
m_account_key_credential->m_account_key = std::move(utility::conversions::from_base64(account_key));
239238
}
240239

241240
/// <summary>
242241
/// Initializes a new instance of the <see cref="azure::storage::storage_credentials" /> class with the specified account name and key value.
243242
/// </summary>
244243
/// <param name="account_name">A string containing the name of the storage account.</param>
245244
/// <param name="account_key">An array of bytes that represent the account access key.</param>
246-
storage_credentials(utility::string_t account_name, std::vector<uint8_t> account_key) : m_account_name(std::move(account_name)), m_account_key_credential(std::make_shared<account_key_credential>())
245+
storage_credentials(utility::string_t account_name, std::vector<uint8_t> account_key) : m_account_name(std::move(account_name)), m_account_key_credential(std::make_shared<account_key_credential>(std::move(account_key)))
247246
{
248-
m_account_key_credential->m_account_key = std::move(account_key);
249247
}
250248

251249
class sas_credential
@@ -410,7 +408,7 @@ namespace azure { namespace storage {
410408
}
411409

412410
/// <summary>
413-
/// Sets the accounts for the credentials.
411+
/// Sets the account key for the credentials.
414412
/// </summary>
415413
/// <param name="account_key">A string containing the Base64-encoded account access key.</param>
416414
void set_account_key(const utility::string_t& account_key)
@@ -419,7 +417,7 @@ namespace azure { namespace storage {
419417
}
420418

421419
/// <summary>
422-
/// Sets the accounts for the credentials.
420+
/// Sets the account key for the credentials.
423421
/// </summary>
424422
/// <param name="account_key">An array of bytes that represent the account access key.</param>
425423
void set_account_key(std::vector<uint8_t> account_key)

0 commit comments

Comments
 (0)