summaryrefslogtreecommitdiff
path: root/xfa/fde/tto
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-13 21:40:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-13 21:40:19 -0700
commitbd9748d504555f100d34025d76a9e0119986bc3f (patch)
tree829a03f0064b6593f6eff9551ed24b862a06006e /xfa/fde/tto
parent6e0d67d4f55fc7cb4632f4c5d08cd7565a237d30 (diff)
downloadpdfium-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/fde/tto')
-rw-r--r--xfa/fde/tto/fde_textout.cpp6
1 files changed, 3 insertions, 3 deletions
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;