mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +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 <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785)
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <string>
|
||||||
|
|
||||||
class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
|
class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
|
|||||||
Members(Members const&) = delete;
|
Members(Members const&) = delete;
|
||||||
|
|
||||||
bool ready{true};
|
bool ready{true};
|
||||||
std::vector<unsigned char> data;
|
std::string data;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::shared_ptr<Members> m;
|
std::shared_ptr<Members> m;
|
||||||
|
@ -19,7 +19,7 @@ Pl_Buffer::~Pl_Buffer() // NOLINT (modernize-use-equals-default)
|
|||||||
void
|
void
|
||||||
Pl_Buffer::write(unsigned char const* buf, size_t len)
|
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;
|
m->ready = false;
|
||||||
|
|
||||||
if (getNext(true)) {
|
if (getNext(true)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user