Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: core/fpdfapi/render/cpdf_imagerenderer.cpp

Issue 2571913002: Avoid the ptr.reset(new XXX()) anti-pattern (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/render/cpdf_devicebuffer.cpp ('k') | core/fpdfapi/render/cpdf_progressiverenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/render/cpdf_imagerenderer.cpp
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index eae32443d864a8e0bc8f5a43528951218b84b391..5ca7ea842f0d86440ca3d14b50092f9add9f3cb9 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -28,6 +28,7 @@
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxge/cfx_fxgedevice.h"
#include "core/fxge/cfx_pathdata.h"
+#include "third_party/base/ptr_util.h"
#ifdef _SKIA_SUPPORT_
#include "core/fxge/skia/fx_skia_device.h"
@@ -437,8 +438,8 @@ bool CPDF_ImageRenderer::StartDIBSource() {
FX_RECT clip_box = m_pRenderStatus->m_pDevice->GetClipBox();
clip_box.Intersect(image_rect);
m_Status = 2;
- m_pTransformer.reset(new CFX_ImageTransformer(m_pDIBSource, &m_ImageMatrix,
- m_Flags, &clip_box));
+ m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>(
+ m_pDIBSource, &m_ImageMatrix, m_Flags, &clip_box);
m_pTransformer->Start();
return true;
}
« no previous file with comments | « core/fpdfapi/render/cpdf_devicebuffer.cpp ('k') | core/fpdfapi/render/cpdf_progressiverenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698