Commit 8b8c9ea6 authored by Albert Astals Cid's avatar Albert Astals Cid

LinkDest::LinkDest: Save unneeded copy() call

parent 8579a7b9
...@@ -230,13 +230,13 @@ LinkDest::LinkDest(const Array *a) { ...@@ -230,13 +230,13 @@ LinkDest::LinkDest(const Array *a) {
error(errSyntaxWarning, -1, "Annotation destination array is too short"); error(errSyntaxWarning, -1, "Annotation destination array is too short");
return; return;
} }
Object obj1 = a->getNF(0).copy(); const Object &obj0 = a->getNF(0);
if (obj1.isInt()) { if (obj0.isInt()) {
pageNum = obj1.getInt() + 1; pageNum = obj0.getInt() + 1;
pageIsRef = false; pageIsRef = false;
} else if (obj1.isRef()) { } else if (obj0.isRef()) {
pageRef.num = obj1.getRefNum(); pageRef.num = obj0.getRefNum();
pageRef.gen = obj1.getRefGen(); pageRef.gen = obj0.getRefGen();
pageIsRef = true; pageIsRef = true;
} else { } else {
error(errSyntaxWarning, -1, "Bad annotation destination"); error(errSyntaxWarning, -1, "Bad annotation destination");
...@@ -244,7 +244,7 @@ LinkDest::LinkDest(const Array *a) { ...@@ -244,7 +244,7 @@ LinkDest::LinkDest(const Array *a) {
} }
// get destination type // get destination type
obj1 = a->get(1); Object obj1 = a->get(1);
// XYZ link // XYZ link
if (obj1.isName("XYZ")) { if (obj1.isName("XYZ")) {
......
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