aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/QPDF_Dictionary.hh
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-12-19 20:20:36 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-12-31 20:37:35 +0100
commitd67a54ae93640f784a03df5d07404df13b1b297a (patch)
treef0db36860634d0707143391b9bfbf1726dcf5914 /libqpdf/qpdf/QPDF_Dictionary.hh
parent846504129f58a638ba481c4329187be8ebb20419 (diff)
downloadqpdf-d67a54ae93640f784a03df5d07404df13b1b297a.tar.zst
Tune parsing of dictionaries in QPDFParser::parse
Use move semantics for dictionary creation.
Diffstat (limited to 'libqpdf/qpdf/QPDF_Dictionary.hh')
-rw-r--r--libqpdf/qpdf/QPDF_Dictionary.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/libqpdf/qpdf/QPDF_Dictionary.hh b/libqpdf/qpdf/QPDF_Dictionary.hh
index 3354a256..bc025403 100644
--- a/libqpdf/qpdf/QPDF_Dictionary.hh
+++ b/libqpdf/qpdf/QPDF_Dictionary.hh
@@ -14,6 +14,8 @@ class QPDF_Dictionary: public QPDFValue
virtual ~QPDF_Dictionary() = default;
static std::shared_ptr<QPDFObject>
create(std::map<std::string, QPDFObjectHandle> const& items);
+ static std::shared_ptr<QPDFObject>
+ create(std::map<std::string, QPDFObjectHandle>&& items);
virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
virtual std::string unparse();
virtual JSON getJSON(int json_version);
@@ -35,6 +37,7 @@ class QPDF_Dictionary: public QPDFValue
private:
QPDF_Dictionary(std::map<std::string, QPDFObjectHandle> const& items);
+ QPDF_Dictionary(std::map<std::string, QPDFObjectHandle>&& items);
std::map<std::string, QPDFObjectHandle> items;
};