Commit e87818f7 authored by Albert Astals Cid's avatar Albert Astals Cid

Two Object::copy calls less

parent 13708e8f
...@@ -252,8 +252,7 @@ bool Catalog::cachePageTree(int page) ...@@ -252,8 +252,7 @@ bool Catalog::cachePageTree(int page)
if (pagesList->empty()) return false; if (pagesList->empty()) return false;
Object pagesDict = pagesList->back().copy(); Object kids = pagesList->back().dictLookup("Kids");
Object kids = pagesDict.dictLookup("Kids");
if (!kids.isArray()) { if (!kids.isArray()) {
error(errSyntaxError, -1, "Kids object (page {0:uld}) is wrong type ({1:s})", error(errSyntaxError, -1, "Kids object (page {0:uld}) is wrong type ({1:s})",
pages.size()+1, kids.getTypeName()); pages.size()+1, kids.getTypeName());
......
...@@ -170,9 +170,9 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) { ...@@ -170,9 +170,9 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
separationInfo = dict->lookup("SeparationInfo"); separationInfo = dict->lookup("SeparationInfo");
// resource dictionary // resource dictionary
obj1 = dict->lookup("Resources"); Object objResources = dict->lookup("Resources");
if (obj1.isDict()) { if (objResources.isDict()) {
resources = obj1.copy(); resources = std::move(objResources);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment