diff options
author | tsepez <tsepez@chromium.org> | 2016-04-13 21:40:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-13 21:40:19 -0700 |
commit | bd9748d504555f100d34025d76a9e0119986bc3f (patch) | |
tree | 829a03f0064b6593f6eff9551ed24b862a06006e /xfa/fee | |
parent | 6e0d67d4f55fc7cb4632f4c5d08cd7565a237d30 (diff) | |
download | pdfium-bd9748d504555f100d34025d76a9e0119986bc3f.tar.xz |
Remove implicit cast from CFX_WideString to (const wchar_t*)
BUG=
Review URL: https://codereview.chromium.org/1882043004
Diffstat (limited to 'xfa/fee')
-rw-r--r-- | xfa/fee/fde_txtedtengine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fee/fde_txtedtengine.cpp b/xfa/fee/fde_txtedtengine.cpp index b98f1e141f..ac3c74f620 100644 --- a/xfa/fee/fde_txtedtengine.cpp +++ b/xfa/fee/fde_txtedtengine.cpp @@ -1195,7 +1195,7 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) { CFX_ArrayTemplate<int32_t> PosArr; int32_t nLength = wsText.GetLength(); int32_t i = 0; - FX_WCHAR* lpPos = (FX_WCHAR*)(const FX_WCHAR*)wsText; + FX_WCHAR* lpPos = const_cast<FX_WCHAR*>(wsText.c_str()); for (i = 0; i < nLength; i++, lpPos++) { if (*lpPos == m_wLineEnd) { *lpPos = wc; @@ -1226,7 +1226,7 @@ void CFDE_TxtEdtEngine::RecoverParagEnd(CFX_WideString& wsText) { wsText = wsTemp; } else { int32_t nLength = wsText.GetLength(); - FX_WCHAR* lpBuf = (FX_WCHAR*)(const FX_WCHAR*)wsText; + FX_WCHAR* lpBuf = const_cast<FX_WCHAR*>(wsText.c_str()); for (int32_t i = 0; i < nLength; i++, lpBuf++) { if (*lpBuf == m_wLineEnd) { *lpBuf = wc; @@ -1527,7 +1527,7 @@ FX_BOOL CFDE_TxtEdtEngine::IsFitArea(CFX_WideString& wsText) { } pTextOut->SetStyles(dwStyle); wsText += L"\n"; - pTextOut->CalcLogicSize(wsText, wsText.GetLength(), rcText); + pTextOut->CalcLogicSize(wsText.c_str(), wsText.GetLength(), rcText); pTextOut->Release(); wsText.Delete(wsText.GetLength() - 1); if ((m_Param.dwMode & FDE_TEXTEDITMODE_LimitArea_Horz) && |