aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Integer.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-06-16 18:45:04 +0200
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-06-27 18:47:02 +0200
commitf0a8178091dfc87bbf9a6751f8fedf007e8eb144 (patch)
tree9a4b3af6d96a274016f0feecbc5deecb345c5f4f /libqpdf/QPDF_Integer.cc
parent5aa8225f493dc3c3171662fecc8a9ff5d0a16feb (diff)
downloadqpdf-f0a8178091dfc87bbf9a6751f8fedf007e8eb144.tar.zst
Refactor QPDFObject creation and cloning
Move responsibility for creating shared pointers to objects and cloning from QPDFObjectHandle to QPDFObject.
Diffstat (limited to 'libqpdf/QPDF_Integer.cc')
-rw-r--r--libqpdf/QPDF_Integer.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/libqpdf/QPDF_Integer.cc b/libqpdf/QPDF_Integer.cc
index c42fa246..e8d23e4a 100644
--- a/libqpdf/QPDF_Integer.cc
+++ b/libqpdf/QPDF_Integer.cc
@@ -7,6 +7,18 @@ QPDF_Integer::QPDF_Integer(long long val) :
{
}
+std::shared_ptr<QPDFObject>
+QPDF_Integer::create(long long value)
+{
+ return do_create(new QPDF_Integer(value));
+}
+
+std::shared_ptr<QPDFObject>
+QPDF_Integer::shallowCopy()
+{
+ return create(val);
+}
+
std::string
QPDF_Integer::unparse()
{