From f0a8178091dfc87bbf9a6751f8fedf007e8eb144 Mon Sep 17 00:00:00 2001 From: m-holger Date: Thu, 16 Jun 2022 17:45:04 +0100 Subject: Refactor QPDFObject creation and cloning Move responsibility for creating shared pointers to objects and cloning from QPDFObjectHandle to QPDFObject. --- libqpdf/QPDF_Name.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libqpdf/QPDF_Name.cc') diff --git a/libqpdf/QPDF_Name.cc b/libqpdf/QPDF_Name.cc index 236d6133..73990775 100644 --- a/libqpdf/QPDF_Name.cc +++ b/libqpdf/QPDF_Name.cc @@ -9,6 +9,18 @@ QPDF_Name::QPDF_Name(std::string const& name) : { } +std::shared_ptr +QPDF_Name::create(std::string const& name) +{ + return do_create(new QPDF_Name(name)); +} + +std::shared_ptr +QPDF_Name::shallowCopy() +{ + return create(name); +} + std::string QPDF_Name::normalizeName(std::string const& name) { -- cgit v1.2.3-70-g09d2