summaryrefslogtreecommitdiff
path: root/poppler/Link.cc
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2019-02-27 15:44:01 +0100
committerAlbert Astals Cid <aacid@kde.org>2019-02-27 17:59:49 +0100
commit49ecbd5933e5b182ffc211d281cdfdc499d0357e (patch)
treec1e3e87aa9a708a63c34970c14be35489d391b24 /poppler/Link.cc
parent099a09c57224a8072d1591c193815e6434178f25 (diff)
Change Dict::lookupNF return a const &
Saves some copy()
Diffstat (limited to 'poppler/Link.cc')
-rw-r--r--poppler/Link.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/poppler/Link.cc b/poppler/Link.cc
index 32fc41cd..428e8b6f 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -163,7 +163,7 @@ LinkAction *LinkAction::parseAction(const Object *obj, const GooString *baseURI,
// Prevent circles in the tree by checking the ref against used refs in
// our current tree branch.
- const Object nextRefObj = obj->dictLookupNF("Next");
+ const Object &nextRefObj = obj->dictLookupNF("Next");
if (nextRefObj.isRef()) {
const Ref ref = nextRefObj.getRef();
if (!seenNextActions->insert(ref.num).second) {
@@ -637,7 +637,7 @@ LinkMovie::LinkMovie(const Object *obj) {
annotRef.num = -1;
annotTitle = nullptr;
- Object tmp = obj->dictLookupNF("Annotation");
+ Object tmp = obj->dictLookupNF("Annotation").copy();
if (tmp.isRef()) {
annotRef = tmp.getRef();
}
@@ -758,7 +758,7 @@ LinkRendition::LinkRendition(const Object *obj) {
renditionObj.setToNull();
}
- screenRef = obj->dictLookupNF("AN");
+ screenRef = obj->dictLookupNF("AN").copy();
if (!screenRef.isRef() && operation >= 0 && operation <= 4) {
error(errSyntaxWarning, -1, "Invalid Rendition Action: no AN field with op = {0:d}", operationCode);
screenRef.setToNull();