From 3fe7be374d02d37677ea4c818b2e7976c66240e5 Mon Sep 17 00:00:00 2001 From: Kolya Kosenko Date: Sun, 21 Aug 2016 14:43:00 +0200 Subject: [PATCH] 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. --- src/msw/secretstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/secretstore.cpp b/src/msw/secretstore.cpp index 72293e41ec..590816be98 100644 --- a/src/msw/secretstore.cpp +++ b/src/msw/secretstore.cpp @@ -69,8 +69,8 @@ public: CREDENTIAL cred; wxZeroMemory(cred); cred.Type = CRED_TYPE_GENERIC; - cred.TargetName = const_cast(target.t_str()); - cred.UserName = const_cast(user.t_str()); + cred.TargetName = const_cast(static_cast(target.t_str())); + cred.UserName = const_cast(static_cast(user.t_str())); cred.CredentialBlobSize = secret.GetSize(); cred.CredentialBlob = static_cast(const_cast(secret.GetData()));