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