[poppler] poppler/Catalog.cc poppler/Page.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 16 16:12:51 UTC 2018


 poppler/Catalog.cc |    3 +--
 poppler/Page.cc    |    6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit e87818f7f9daff228fbc820aa78b3a08615e0826
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Nov 16 17:12:24 2018 +0100

    Two Object::copy calls less

diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc
index 25f0c366..a842dbfd 100644
--- a/poppler/Catalog.cc
+++ b/poppler/Catalog.cc
@@ -252,8 +252,7 @@ bool Catalog::cachePageTree(int page)
 
     if (pagesList->empty()) return false;
 
-    Object pagesDict = pagesList->back().copy();
-    Object kids = pagesDict.dictLookup("Kids");
+    Object kids = pagesList->back().dictLookup("Kids");
     if (!kids.isArray()) {
       error(errSyntaxError, -1, "Kids object (page {0:uld}) is wrong type ({1:s})",
 	    pages.size()+1, kids.getTypeName());
diff --git a/poppler/Page.cc b/poppler/Page.cc
index fddb831c..15f751bc 100644
--- a/poppler/Page.cc
+++ b/poppler/Page.cc
@@ -170,9 +170,9 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
   separationInfo = dict->lookup("SeparationInfo");
 
   // resource dictionary
-  obj1 = dict->lookup("Resources");
-  if (obj1.isDict()) {
-    resources = obj1.copy();
+  Object objResources = dict->lookup("Resources");
+  if (objResources.isDict()) {
+    resources = std::move(objResources);
   }
 }
 


More information about the poppler mailing list