From 659a56bcbeb12b22708fe979d12b318080d828ba Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 30 Dec 2014 16:56:12 -0800 Subject: Get rid of FX_LPCSTR cast. Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004 --- fpdfsdk/src/formfiller/FFL_ComboBox.cpp | 2 +- fpdfsdk/src/formfiller/FFL_TextField.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'fpdfsdk/src/formfiller') diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp index ee6b7bd83a..9e58c952aa 100644 --- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp +++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp @@ -364,7 +364,7 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) CFX_WideString wsText = pEdit->GetText(); int nCharacters = wsText.GetLength(); CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); - unsigned short* pBuffer = (unsigned short*)(FX_LPCSTR)bsUTFText; + unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str(); m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE); pEdit->SetEditNotify(this); diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/src/formfiller/FFL_TextField.cpp index 45c716280c..6a70981e4f 100644 --- a/fpdfsdk/src/formfiller/FFL_TextField.cpp +++ b/fpdfsdk/src/formfiller/FFL_TextField.cpp @@ -364,7 +364,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) CFX_WideString wsText = pEdit->GetText(); int nCharacters = wsText.GetLength(); CFX_ByteString bsUTFText = wsText.UTF16LE_Encode(); - unsigned short* pBuffer = (unsigned short*)(FX_LPCSTR)bsUTFText; + unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str(); m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer, nCharacters, TRUE); pEdit->SetEditNotify(this); -- cgit v1.2.3