summaryrefslogtreecommitdiff
path: root/xfa/fgas
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/fgas
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/fgas')
-rw-r--r--xfa/fgas/crt/ifgas_stream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fgas/crt/ifgas_stream.cpp b/xfa/fgas/crt/ifgas_stream.cpp
index eef19a59ff..4981145f74 100644
--- a/xfa/fgas/crt/ifgas_stream.cpp
+++ b/xfa/fgas/crt/ifgas_stream.cpp
@@ -1082,7 +1082,7 @@ bool CFGAS_Stream::LoadFile(const wchar_t* pszSrcFileName, uint32_t dwAccess) {
if (!pszSrcFileName || FXSYS_wcslen(pszSrcFileName) < 1)
return false;
- std::unique_ptr<CFGAS_FileStreamImp> pImp(new CFGAS_FileStreamImp());
+ auto pImp = pdfium::MakeUnique<CFGAS_FileStreamImp>();
if (!pImp->LoadFile(pszSrcFileName, dwAccess))
return false;
@@ -1102,7 +1102,7 @@ bool CFGAS_Stream::LoadFileRead(
if (!pFileRead)
return false;
- std::unique_ptr<CFGAS_FileReadStreamImp> pImp(new CFGAS_FileReadStreamImp());
+ auto pImp = pdfium::MakeUnique<CFGAS_FileReadStreamImp>();
if (!pImp->LoadFileRead(pFileRead, dwAccess))
return false;
@@ -1142,7 +1142,7 @@ bool CFGAS_Stream::LoadBuffer(uint8_t* pData,
if (!pData || iTotalSize < 1)
return false;
- std::unique_ptr<CFGAS_BufferStreamImp> pImp(new CFGAS_BufferStreamImp());
+ auto pImp = pdfium::MakeUnique<CFGAS_BufferStreamImp>();
if (!pImp->LoadBuffer(pData, iTotalSize, dwAccess))
return false;