summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/cxfa_textlayout.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-30 16:12:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-30 20:26:02 +0000
commit0bb1333a9eff1190ddd68f34c71d6a779c69dfef (patch)
tree5a46946c4852f147309e2b1389e6f42d6553abf7 /xfa/fxfa/app/cxfa_textlayout.cpp
parent908c848202ef137e98d96f82a4eadfae551403b7 (diff)
downloadpdfium-0bb1333a9eff1190ddd68f34c71d6a779c69dfef.tar.xz
Add some calls to MakeUnique
This CL replaces some new's with pdfium::MakeUnique. Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb Reviewed-on: https://pdfium-review.googlesource.com/3430 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/app/cxfa_textlayout.cpp')
-rw-r--r--xfa/fxfa/app/cxfa_textlayout.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fxfa/app/cxfa_textlayout.cpp b/xfa/fxfa/app/cxfa_textlayout.cpp
index c8ed4f7f46..f16fd8c1a9 100644
--- a/xfa/fxfa/app/cxfa_textlayout.cpp
+++ b/xfa/fxfa/app/cxfa_textlayout.cpp
@@ -559,8 +559,7 @@ bool CXFA_TextLayout::DrawString(CFX_RenderDevice* pFxDevice,
if (!pFxDevice)
return false;
- std::unique_ptr<CFDE_RenderDevice> pDevice(
- new CFDE_RenderDevice(pFxDevice, false));
+ auto pDevice = pdfium::MakeUnique<CFDE_RenderDevice>(pFxDevice, false);
pDevice->SaveState();
pDevice->SetClipRect(rtClip);
@@ -1176,7 +1175,7 @@ void CXFA_TextLayout::RenderPath(CFDE_RenderDevice* pDevice,
return;
pPen->SetColor(pPiece->dwColor);
- std::unique_ptr<CFDE_Path> pPath(new CFDE_Path);
+ auto pPath = pdfium::MakeUnique<CFDE_Path>();
int32_t iChars = GetDisplayPos(pPiece, pCharPos);
if (iChars > 0) {
CFX_PointF pt1, pt2;