summaryrefslogtreecommitdiff
path: root/core/fxge/dib/fx_dib_engine_unittest.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-18 16:22:41 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-18 16:22:41 -0800
commit0e606b5ecd6e45f74391f110cc1fe0cce0e80c64 (patch)
tree07c55fac710b191cf5d1d6595c63b90ca52e3cbb /core/fxge/dib/fx_dib_engine_unittest.cpp
parent430ab8363e77c48b2c2435af4d289f85e2be1b96 (diff)
downloadpdfium-0e606b5ecd6e45f74391f110cc1fe0cce0e80c64.tar.xz
Make CPDF_Dictionary use unique pointers.chromium/2926
Some changes were required to match underlying ctors as invoked by the templated methods. Many release() calls go away, a few WrapUniques() are introduced to avoid going deeper into other code. Review-Url: https://codereview.chromium.org/2510223002
Diffstat (limited to 'core/fxge/dib/fx_dib_engine_unittest.cpp')
-rw-r--r--core/fxge/dib/fx_dib_engine_unittest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxge/dib/fx_dib_engine_unittest.cpp b/core/fxge/dib/fx_dib_engine_unittest.cpp
index 57e829e9d2..faacebd5fc 100644
--- a/core/fxge/dib/fx_dib_engine_unittest.cpp
+++ b/core/fxge/dib/fx_dib_engine_unittest.cpp
@@ -18,8 +18,8 @@ TEST(CStretchEngine, OverflowInCtor) {
FX_RECT clip_rect;
std::unique_ptr<CPDF_Dictionary> dict_obj =
pdfium::MakeUnique<CPDF_Dictionary>();
- dict_obj->SetFor("Width", new CPDF_Number(71000));
- dict_obj->SetFor("Height", new CPDF_Number(12500));
+ dict_obj->SetNewFor<CPDF_Number>("Width", 71000);
+ dict_obj->SetNewFor<CPDF_Number>("Height", 12500);
std::unique_ptr<CPDF_Stream> stream =
pdfium::MakeUnique<CPDF_Stream>(nullptr, 0, dict_obj.release());
CPDF_DIBSource dib_source;