From d403329fa818ffd650221cee366c837f867e3df6 Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 19 Apr 2016 12:03:15 -0700 Subject: Store WideString, not raw pointer, in FX_TXTRUN Storing raw pointers in structs is a questionable idea, given that we've got string classes to auto-manage lifetimes of the underlying storage. Also, return FX_TXTRUN while we're at it, since we count on RVO removing copies nowadays. BUG=pdfium:480 Review URL: https://codereview.chromium.org/1900743004 --- xfa/fee/fde_txtedtpage.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'xfa/fee') diff --git a/xfa/fee/fde_txtedtpage.cpp b/xfa/fee/fde_txtedtpage.cpp index eaf2627b56..4aadb397da 100644 --- a/xfa/fee/fde_txtedtpage.cpp +++ b/xfa/fee/fde_txtedtpage.cpp @@ -81,8 +81,6 @@ int32_t CFDE_TxtEdtTextSet::GetDisplayPos(FDE_HVISUALOBJ hText, FX_TXTRUN tr; tr.pAccess = m_pPage; tr.pIdentity = (void*)hText; - tr.pStr = NULL; - tr.pWidths = NULL; tr.iLength = nLength; tr.pFont = pTextParams->pFont; tr.fFontSize = pTextParams->fFontSize; @@ -114,8 +112,6 @@ int32_t CFDE_TxtEdtTextSet::GetCharRects_Impl(FDE_HVISUALOBJ hText, FX_TXTRUN tr; tr.pAccess = m_pPage; tr.pIdentity = (void*)hText; - tr.pStr = NULL; - tr.pWidths = NULL; tr.iLength = nLength; tr.pFont = pTextParams->pFont; tr.fFontSize = pTextParams->fFontSize; -- cgit v1.2.3