mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Change Pl_Buffer to use std::string for storage
This commit is contained in:
parent
81823f4032
commit
d11622b6fd
@ -33,7 +33,7 @@
|
||||
#include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785)
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
|
||||
{
|
||||
@ -78,7 +78,7 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
|
||||
Members(Members const&) = delete;
|
||||
|
||||
bool ready{true};
|
||||
std::vector<unsigned char> data;
|
||||
std::string data;
|
||||
};
|
||||
|
||||
std::shared_ptr<Members> m;
|
||||
|
@ -19,7 +19,7 @@ Pl_Buffer::~Pl_Buffer() // NOLINT (modernize-use-equals-default)
|
||||
void
|
||||
Pl_Buffer::write(unsigned char const* buf, size_t len)
|
||||
{
|
||||
m->data.insert(m->data.end(), buf, buf + len);
|
||||
m->data.append(reinterpret_cast<char const*>(buf), len);
|
||||
m->ready = false;
|
||||
|
||||
if (getNext(true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user