Fix wxSecretStore compilation in wxMSW UTF-8 build

We need to explicitly cast wxScopedWCharBuffer to TCHAR* before casting away
constness from it in this case, unfortunately.

Closes #17634.
This commit is contained in:
Kolya Kosenko
2016-08-21 14:43:00 +02:00
committed by Vadim Zeitlin
parent ec8d0c6e78
commit 3fe7be374d

View File

@@ -69,8 +69,8 @@ public:
CREDENTIAL cred;
wxZeroMemory(cred);
cred.Type = CRED_TYPE_GENERIC;
cred.TargetName = const_cast<TCHAR*>(target.t_str());
cred.UserName = const_cast<TCHAR*>(user.t_str());
cred.TargetName = const_cast<TCHAR*>(static_cast<const TCHAR*>(target.t_str()));
cred.UserName = const_cast<TCHAR*>(static_cast<const TCHAR*>(user.t_str()));
cred.CredentialBlobSize = secret.GetSize();
cred.CredentialBlob = static_cast<BYTE *>(const_cast<void*>(secret.GetData()));