[poppler] poppler/Link.cc poppler/Object.h poppler/StructElement.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 29 14:44:41 UTC 2019


 poppler/Link.cc         |    6 ++----
 poppler/Object.h        |    2 +-
 poppler/StructElement.h |    2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 255eec8cac9ad68b129ed44326118dd1064eb331
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Mar 29 12:44:20 2019 +0100

    Use the default provided Ref = operator, it's good enough

diff --git a/poppler/Link.cc b/poppler/Link.cc
index 33b842f1..5a5e8682 100644
--- a/poppler/Link.cc
+++ b/poppler/Link.cc
@@ -239,8 +239,7 @@ LinkDest::LinkDest(const Array *a) {
     pageNum = obj0.getInt() + 1;
     pageIsRef = false;
   } else if (obj0.isRef()) {
-    pageRef.num = obj0.getRefNum();
-    pageRef.gen = obj0.getRefGen();
+    pageRef = obj0.getRef();
     pageIsRef = true;
   } else {
     error(errSyntaxWarning, -1, "Bad annotation destination");
@@ -859,8 +858,7 @@ LinkOCGState::LinkOCGState(const Object *obj) {
         if (stList) {
 	  Ref ocgRef = obj2.getRef();
 	  Ref *item = new Ref();
-	  item->num = ocgRef.num;
-	  item->gen = ocgRef.gen;
+	  *item = ocgRef;
 	  stList->list->push_back(item);
 	} else {
 	  error(errSyntaxWarning, -1, "Invalid OCG Action State array, expected name instead of ref");
diff --git a/poppler/Object.h b/poppler/Object.h
index 914b10ba..2dbc9e96 100644
--- a/poppler/Object.h
+++ b/poppler/Object.h
@@ -179,7 +179,7 @@ public:
   explicit Object(Stream *streamA)
     { assert(streamA); type = objStream; stream = streamA; }
   explicit Object(const Ref r)
-    { type = objRef; ref.num = r.num; ref.gen = r.gen; }
+    { type = objRef; ref = r; }
 
   template<typename T> Object(T) = delete;
 
diff --git a/poppler/StructElement.h b/poppler/StructElement.h
index 4cc052a0..83023eec 100644
--- a/poppler/StructElement.h
+++ b/poppler/StructElement.h
@@ -279,7 +279,7 @@ private:
     };
 
     ContentData(int mcidA): mcid(mcidA) {}
-    ContentData(const Ref r) { ref.num = r.num; ref.gen = r.gen; }
+    ContentData(const Ref r) { ref = r; }
   };
 
   // Common data


More information about the poppler mailing list