summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-09-28 17:04:51 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-28 17:04:51 -0700
commitd4c34f208aa3b76c5941395823c6dcf6bb7e2f34 (patch)
treeb0d73710639ddfe2fff5578e7cd6b761cd4052ed /fpdfsdk/fpdfview.cpp
parent5ef75ba52b1ce6024d6aa43b03e25824a04b469b (diff)
downloadpdfium-d4c34f208aa3b76c5941395823c6dcf6bb7e2f34.tar.xz
Replace std::unique_ptr.reset() with WrapUnique assignment.
fpdfsdk/ edition. Review-Url: https://codereview.chromium.org/2381723002
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 62cafa0781..3c60ab0041 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -7,6 +7,7 @@
#include "public/fpdfview.h"
#include <memory>
+#include <utility>
#include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
@@ -845,7 +846,7 @@ void FPDF_RenderPage_Retail(CPDF_PageRenderContext* pContext,
return;
if (!pContext->m_pOptions)
- pContext->m_pOptions.reset(new CPDF_RenderOptions);
+ pContext->m_pOptions = WrapUnique(new CPDF_RenderOptions);
if (flags & FPDF_LCD_TEXT)
pContext->m_pOptions->m_Flags |= RENDER_CLEARTYPE;
@@ -884,17 +885,17 @@ void FPDF_RenderPage_Retail(CPDF_PageRenderContext* pContext,
pContext->m_pDevice->SetClip_Rect(
FX_RECT(start_x, start_y, start_x + size_x, start_y + size_y));
- pContext->m_pContext.reset(new CPDF_RenderContext(pPage));
+ pContext->m_pContext = WrapUnique(new CPDF_RenderContext(pPage));
pContext->m_pContext->AppendLayer(pPage, &matrix);
if (flags & FPDF_ANNOT) {
- pContext->m_pAnnots.reset(new CPDF_AnnotList(pPage));
+ pContext->m_pAnnots = WrapUnique(new CPDF_AnnotList(pPage));
FX_BOOL bPrinting = pContext->m_pDevice->GetDeviceClass() != FXDC_DISPLAY;
pContext->m_pAnnots->DisplayAnnots(pPage, pContext->m_pContext.get(),
bPrinting, &matrix, FALSE, nullptr);
}
- pContext->m_pRenderer.reset(new CPDF_ProgressiveRenderer(
+ pContext->m_pRenderer = WrapUnique(new CPDF_ProgressiveRenderer(
pContext->m_pContext.get(), pContext->m_pDevice.get(),
pContext->m_pOptions.get()));
pContext->m_pRenderer->Start(pause);