diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-01-22 19:25:17 +0100 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-01-23 13:00:58 +0100 |
commit | d16308b3f5b111a23e0290e14b54fda4455265f0 (patch) | |
tree | deb6775400fee588ea516077c4a82f835aa9c0f1 /include | |
parent | e8cdc4628634c44aa5bae0230050e4336551fe32 (diff) | |
download | qpdf-d16308b3f5b111a23e0290e14b54fda4455265f0.tar.zst |
Tune QPDFWriter::writeString etc methods
Use string_view parameters and call pipeline write methods directly.
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFWriter.hh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index af6c15be..8faf9c32 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -36,6 +36,7 @@ #include <set> #include <stdio.h> #include <string> +#include <string_view> #include <vector> #include <qpdf/Constants.h> @@ -553,10 +554,10 @@ class QPDFWriter unsigned int bytesNeeded(long long n); void writeBinary(unsigned long long val, unsigned int bytes); - void writeString(std::string const& str); + void writeString(std::string_view str); void writeBuffer(std::shared_ptr<Buffer>&); - void writeStringQDF(std::string const& str); - void writeStringNoQDF(std::string const& str); + void writeStringQDF(std::string_view str); + void writeStringNoQDF(std::string_view str); void writePad(size_t nspaces); void assignCompressedObjectNumbers(QPDFObjGen const& og); void enqueueObject(QPDFObjectHandle object); |