From bd9748d504555f100d34025d76a9e0119986bc3f Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 13 Apr 2016 21:40:19 -0700 Subject: Remove implicit cast from CFX_WideString to (const wchar_t*) BUG= Review URL: https://codereview.chromium.org/1882043004 --- xfa/fde/tto/fde_textout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fde/tto') diff --git a/xfa/fde/tto/fde_textout.cpp b/xfa/fde/tto/fde_textout.cpp index d846abc886..8e9c30e2ba 100644 --- a/xfa/fde/tto/fde_textout.cpp +++ b/xfa/fde/tto/fde_textout.cpp @@ -624,7 +624,7 @@ void CFDE_TextOut::LoadEllipsis() { return; } ExpandBuffer(iLength, 1); - const FX_WCHAR* pStr = (const FX_WCHAR*)m_wsEllipsis; + const FX_WCHAR* pStr = m_wsEllipsis.c_str(); int32_t* pCharWidths = m_pEllCharWidths; uint32_t dwBreakStatus; FX_WCHAR wch; @@ -873,7 +873,7 @@ void CFDE_TextOut::Reload(const CFX_RectF& rect) { } } void CFDE_TextOut::ReloadLinePiece(CFDE_TTOLine* pLine, const CFX_RectF& rect) { - const FX_WCHAR* pwsStr = (const FX_WCHAR*)m_wsText; + const FX_WCHAR* pwsStr = m_wsText.c_str(); FX_BOOL bVertical = !!(m_dwStyles & FDE_TTOSTYLE_VerticalLayout); int32_t iPieceWidths = 0; FDE_LPTTOPIECE pPiece = pLine->GetPtrAt(0); @@ -990,7 +990,7 @@ int32_t CFDE_TextOut::GetCharRects(FDE_LPTTOPIECE pPiece) { void CFDE_TextOut::ToTextRun(const FDE_LPTTOPIECE pPiece, FX_TXTRUN& tr) { tr.pAccess = NULL; tr.pIdentity = NULL; - tr.pStr = (const FX_WCHAR*)m_wsText + pPiece->iStartChar; + tr.pStr = (m_wsText + pPiece->iStartChar).c_str(); tr.pWidths = m_pCharWidths + pPiece->iStartChar; tr.iLength = pPiece->iChars; tr.pFont = m_pFont; -- cgit v1.2.3