mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-02 22:50:20 +00:00
Remove redundant 'virtual' specifiers
This commit is contained in:
parent
774d0d558e
commit
ba5a3567a2
@ -49,8 +49,8 @@ class Pl_XOR: public Pipeline
|
|||||||
public:
|
public:
|
||||||
Pl_XOR(char const* identifier, Pipeline* next, unsigned char key);
|
Pl_XOR(char const* identifier, Pipeline* next, unsigned char key);
|
||||||
virtual ~Pl_XOR() = default;
|
virtual ~Pl_XOR() = default;
|
||||||
virtual void write(unsigned char const* data, size_t len) override;
|
void write(unsigned char const* data, size_t len) override;
|
||||||
virtual void finish() override;
|
void finish() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned char key;
|
unsigned char key;
|
||||||
@ -92,9 +92,9 @@ class SF_XORDecode: public QPDFStreamFilter
|
|||||||
// "uncompress" the stream by default.
|
// "uncompress" the stream by default.
|
||||||
public:
|
public:
|
||||||
virtual ~SF_XORDecode() = default;
|
virtual ~SF_XORDecode() = default;
|
||||||
virtual bool setDecodeParms(QPDFObjectHandle decode_parms) override;
|
bool setDecodeParms(QPDFObjectHandle decode_parms) override;
|
||||||
virtual Pipeline* getDecodePipeline(Pipeline* next) override;
|
Pipeline* getDecodePipeline(Pipeline* next) override;
|
||||||
virtual bool isSpecializedCompression() override;
|
bool isSpecializedCompression() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned char key;
|
unsigned char key;
|
||||||
@ -200,7 +200,7 @@ class StreamReplacer: public QPDFObjectHandle::StreamDataProvider
|
|||||||
public:
|
public:
|
||||||
StreamReplacer(QPDF* pdf);
|
StreamReplacer(QPDF* pdf);
|
||||||
virtual ~StreamReplacer() = default;
|
virtual ~StreamReplacer() = default;
|
||||||
virtual void
|
void
|
||||||
provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override;
|
provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override;
|
||||||
|
|
||||||
void registerStream(
|
void registerStream(
|
||||||
|
@ -34,7 +34,7 @@ class ImageInverter: public QPDFObjectHandle::StreamDataProvider
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ImageInverter() = default;
|
virtual ~ImageInverter() = default;
|
||||||
virtual void
|
void
|
||||||
provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override;
|
provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override;
|
||||||
|
|
||||||
void registerImage(
|
void registerImage(
|
||||||
|
@ -102,7 +102,7 @@ class QPDFWriter
|
|||||||
QPDF_DLL
|
QPDF_DLL
|
||||||
virtual ~FunctionProgressReporter();
|
virtual ~FunctionProgressReporter();
|
||||||
QPDF_DLL
|
QPDF_DLL
|
||||||
virtual void reportProgress(int) override;
|
void reportProgress(int) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::function<void(int)> handler;
|
std::function<void(int)> handler;
|
||||||
|
@ -61,41 +61,41 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~InvalidInputSource() = default;
|
virtual ~InvalidInputSource() = default;
|
||||||
virtual qpdf_offset_t
|
qpdf_offset_t
|
||||||
findAndSkipNextEOL() override
|
findAndSkipNextEOL() override
|
||||||
{
|
{
|
||||||
throwException();
|
throwException();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual std::string const&
|
std::string const&
|
||||||
getName() const override
|
getName() const override
|
||||||
{
|
{
|
||||||
static std::string name("closed input source");
|
static std::string name("closed input source");
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
virtual qpdf_offset_t
|
qpdf_offset_t
|
||||||
tell() override
|
tell() override
|
||||||
{
|
{
|
||||||
throwException();
|
throwException();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual void
|
void
|
||||||
seek(qpdf_offset_t offset, int whence) override
|
seek(qpdf_offset_t offset, int whence) override
|
||||||
{
|
{
|
||||||
throwException();
|
throwException();
|
||||||
}
|
}
|
||||||
virtual void
|
void
|
||||||
rewind() override
|
rewind() override
|
||||||
{
|
{
|
||||||
throwException();
|
throwException();
|
||||||
}
|
}
|
||||||
virtual size_t
|
size_t
|
||||||
read(char* buffer, size_t length) override
|
read(char* buffer, size_t length) override
|
||||||
{
|
{
|
||||||
throwException();
|
throwException();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual void
|
void
|
||||||
unreadCh(char ch) override
|
unreadCh(char ch) override
|
||||||
{
|
{
|
||||||
throwException();
|
throwException();
|
||||||
|
@ -17,14 +17,14 @@ namespace
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
write(unsigned char const* data, size_t len) override
|
write(unsigned char const* data, size_t len) override
|
||||||
{
|
{
|
||||||
this->used = true;
|
this->used = true;
|
||||||
getNext()->write(data, len);
|
getNext()->write(data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
finish() override
|
finish() override
|
||||||
{
|
{
|
||||||
getNext()->finish();
|
getNext()->finish();
|
||||||
|
@ -7,18 +7,18 @@ namespace
|
|||||||
class NameTreeDetails: public NNTreeDetails
|
class NameTreeDetails: public NNTreeDetails
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual std::string const&
|
std::string const&
|
||||||
itemsKey() const override
|
itemsKey() const override
|
||||||
{
|
{
|
||||||
static std::string k("/Names");
|
static std::string k("/Names");
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
virtual bool
|
bool
|
||||||
keyValid(QPDFObjectHandle oh) const override
|
keyValid(QPDFObjectHandle oh) const override
|
||||||
{
|
{
|
||||||
return oh.isString();
|
return oh.isString();
|
||||||
}
|
}
|
||||||
virtual int
|
int
|
||||||
compareKeys(QPDFObjectHandle a, QPDFObjectHandle b) const override
|
compareKeys(QPDFObjectHandle a, QPDFObjectHandle b) const override
|
||||||
{
|
{
|
||||||
if (!(keyValid(a) && keyValid(b))) {
|
if (!(keyValid(a) && keyValid(b))) {
|
||||||
|
@ -8,18 +8,18 @@ namespace
|
|||||||
class NumberTreeDetails: public NNTreeDetails
|
class NumberTreeDetails: public NNTreeDetails
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual std::string const&
|
std::string const&
|
||||||
itemsKey() const override
|
itemsKey() const override
|
||||||
{
|
{
|
||||||
static std::string k("/Nums");
|
static std::string k("/Nums");
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
virtual bool
|
bool
|
||||||
keyValid(QPDFObjectHandle oh) const override
|
keyValid(QPDFObjectHandle oh) const override
|
||||||
{
|
{
|
||||||
return oh.isInteger();
|
return oh.isInteger();
|
||||||
}
|
}
|
||||||
virtual int
|
int
|
||||||
compareKeys(QPDFObjectHandle a, QPDFObjectHandle b) const override
|
compareKeys(QPDFObjectHandle a, QPDFObjectHandle b) const override
|
||||||
{
|
{
|
||||||
if (!(keyValid(a) && keyValid(b))) {
|
if (!(keyValid(a) && keyValid(b))) {
|
||||||
|
@ -1446,13 +1446,13 @@ namespace
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void
|
void
|
||||||
provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override
|
provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override
|
||||||
{
|
{
|
||||||
p1(pipeline);
|
p1(pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
provideStreamData(
|
provideStreamData(
|
||||||
QPDFObjGen const&,
|
QPDFObjGen const&,
|
||||||
Pipeline* pipeline,
|
Pipeline* pipeline,
|
||||||
|
@ -242,13 +242,13 @@ class QPDF::JSONReactor: public JSON::Reactor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual ~JSONReactor() = default;
|
virtual ~JSONReactor() = default;
|
||||||
virtual void dictionaryStart() override;
|
void dictionaryStart() override;
|
||||||
virtual void arrayStart() override;
|
void arrayStart() override;
|
||||||
virtual void containerEnd(JSON const& value) override;
|
void containerEnd(JSON const& value) override;
|
||||||
virtual void topLevelScalar() override;
|
void topLevelScalar() override;
|
||||||
virtual bool
|
bool
|
||||||
dictionaryItem(std::string const& key, JSON const& value) override;
|
dictionaryItem(std::string const& key, JSON const& value) override;
|
||||||
virtual bool arrayItem(JSON const& value) override;
|
bool arrayItem(JSON const& value) override;
|
||||||
|
|
||||||
bool anyErrors() const;
|
bool anyErrors() const;
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@ class Pl_Base64: public Pipeline
|
|||||||
enum action_e { a_encode, a_decode };
|
enum action_e { a_encode, a_decode };
|
||||||
Pl_Base64(char const* identifier, Pipeline* next, action_e);
|
Pl_Base64(char const* identifier, Pipeline* next, action_e);
|
||||||
virtual ~Pl_Base64() = default;
|
virtual ~Pl_Base64() = default;
|
||||||
virtual void write(unsigned char const* buf, size_t len) override;
|
void write(unsigned char const* buf, size_t len) override;
|
||||||
virtual void finish() override;
|
void finish() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void decode(unsigned char const* buf, size_t len);
|
void decode(unsigned char const* buf, size_t len);
|
||||||
|
@ -8,8 +8,8 @@ class ResourceFinder: public QPDFObjectHandle::ParserCallbacks
|
|||||||
public:
|
public:
|
||||||
ResourceFinder();
|
ResourceFinder();
|
||||||
virtual ~ResourceFinder() = default;
|
virtual ~ResourceFinder() = default;
|
||||||
virtual void handleObject(QPDFObjectHandle, size_t, size_t) override;
|
void handleObject(QPDFObjectHandle, size_t, size_t) override;
|
||||||
virtual void handleEOF() override;
|
void handleEOF() override;
|
||||||
std::set<std::string> const& getNames() const;
|
std::set<std::string> const& getNames() const;
|
||||||
std::map<std::string, std::map<std::string, std::set<size_t>>> const&
|
std::map<std::string, std::map<std::string, std::set<size_t>>> const&
|
||||||
getNamesByResourceType() const;
|
getNamesByResourceType() const;
|
||||||
|
@ -11,7 +11,7 @@ class SF_ASCII85Decode: public QPDFStreamFilter
|
|||||||
SF_ASCII85Decode() = default;
|
SF_ASCII85Decode() = default;
|
||||||
virtual ~SF_ASCII85Decode() = default;
|
virtual ~SF_ASCII85Decode() = default;
|
||||||
|
|
||||||
virtual Pipeline*
|
Pipeline*
|
||||||
getDecodePipeline(Pipeline* next) override
|
getDecodePipeline(Pipeline* next) override
|
||||||
{
|
{
|
||||||
this->pipeline =
|
this->pipeline =
|
||||||
|
@ -11,7 +11,7 @@ class SF_ASCIIHexDecode: public QPDFStreamFilter
|
|||||||
SF_ASCIIHexDecode() = default;
|
SF_ASCIIHexDecode() = default;
|
||||||
virtual ~SF_ASCIIHexDecode() = default;
|
virtual ~SF_ASCIIHexDecode() = default;
|
||||||
|
|
||||||
virtual Pipeline*
|
Pipeline*
|
||||||
getDecodePipeline(Pipeline* next) override
|
getDecodePipeline(Pipeline* next) override
|
||||||
{
|
{
|
||||||
this->pipeline =
|
this->pipeline =
|
||||||
|
@ -11,7 +11,7 @@ class SF_DCTDecode: public QPDFStreamFilter
|
|||||||
SF_DCTDecode() = default;
|
SF_DCTDecode() = default;
|
||||||
virtual ~SF_DCTDecode() = default;
|
virtual ~SF_DCTDecode() = default;
|
||||||
|
|
||||||
virtual Pipeline*
|
Pipeline*
|
||||||
getDecodePipeline(Pipeline* next) override
|
getDecodePipeline(Pipeline* next) override
|
||||||
{
|
{
|
||||||
this->pipeline = std::make_shared<Pl_DCT>("DCT decode", next);
|
this->pipeline = std::make_shared<Pl_DCT>("DCT decode", next);
|
||||||
@ -24,13 +24,13 @@ class SF_DCTDecode: public QPDFStreamFilter
|
|||||||
return std::make_shared<SF_DCTDecode>();
|
return std::make_shared<SF_DCTDecode>();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
isSpecializedCompression() override
|
isSpecializedCompression() override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
isLossyCompression() override
|
isLossyCompression() override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -11,7 +11,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter
|
|||||||
SF_RunLengthDecode() = default;
|
SF_RunLengthDecode() = default;
|
||||||
virtual ~SF_RunLengthDecode() = default;
|
virtual ~SF_RunLengthDecode() = default;
|
||||||
|
|
||||||
virtual Pipeline*
|
Pipeline*
|
||||||
getDecodePipeline(Pipeline* next) override
|
getDecodePipeline(Pipeline* next) override
|
||||||
{
|
{
|
||||||
this->pipeline = std::make_shared<Pl_RunLength>(
|
this->pipeline = std::make_shared<Pl_RunLength>(
|
||||||
@ -25,7 +25,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter
|
|||||||
return std::make_shared<SF_RunLengthDecode>();
|
return std::make_shared<SF_RunLengthDecode>();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool
|
bool
|
||||||
isSpecializedCompression() override
|
isSpecializedCompression() override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -11,13 +11,13 @@ namespace
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~Reactor() = default;
|
virtual ~Reactor() = default;
|
||||||
virtual void dictionaryStart() override;
|
void dictionaryStart() override;
|
||||||
virtual void arrayStart() override;
|
void arrayStart() override;
|
||||||
virtual void containerEnd(JSON const& value) override;
|
void containerEnd(JSON const& value) override;
|
||||||
virtual void topLevelScalar() override;
|
void topLevelScalar() override;
|
||||||
virtual bool
|
bool
|
||||||
dictionaryItem(std::string const& key, JSON const& value) override;
|
dictionaryItem(std::string const& key, JSON const& value) override;
|
||||||
virtual bool arrayItem(JSON const& value) override;
|
bool arrayItem(JSON const& value) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void printItem(JSON const&);
|
void printItem(JSON const&);
|
||||||
|
Loading…
Reference in New Issue
Block a user