diff options
author | tsepez <tsepez@chromium.org> | 2016-11-15 11:33:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-15 11:33:44 -0800 |
commit | 70c4afd5c3c5c44cd24f814423a23a6ef05bba02 (patch) | |
tree | cbe593d0b6c0bfc6fd5038bf60a77a94e49c69c9 /fpdfsdk/fpdfdoc_unittest.cpp | |
parent | f16f6b8b52277348f5d571b7641bb0bbd5239589 (diff) | |
download | pdfium-70c4afd5c3c5c44cd24f814423a23a6ef05bba02.tar.xz |
Make AddIndirectObject() take a unique_ptr.
Add convenience routines to create and add object in
one step.
Review-Url: https://codereview.chromium.org/2489283003
Diffstat (limited to 'fpdfsdk/fpdfdoc_unittest.cpp')
-rw-r--r-- | fpdfsdk/fpdfdoc_unittest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp index fc902570b4..7d1d6b4ba8 100644 --- a/fpdfsdk/fpdfdoc_unittest.cpp +++ b/fpdfsdk/fpdfdoc_unittest.cpp @@ -81,8 +81,8 @@ class PDFDocTest : public testing::Test { std::vector<DictObjInfo> info; for (int i = 0; i < num; ++i) { // Objects created will be released by the document. - CPDF_Dictionary* obj = new CPDF_Dictionary(); - info.push_back({m_pIndirectObjs->AddIndirectObject(obj), obj}); + CPDF_Dictionary* obj = m_pIndirectObjs->NewIndirect<CPDF_Dictionary>(); + info.push_back({obj->GetObjNum(), obj}); } return info; } |