Commit ba5a3567a262efdfc171decf481b716ea29743d6
1 parent
774d0d55
Remove redundant 'virtual' specifiers
Showing
16 changed files
with
48 additions
and
48 deletions
examples/pdf-custom-filter.cc
| ... | ... | @@ -49,8 +49,8 @@ class Pl_XOR: public Pipeline |
| 49 | 49 | public: |
| 50 | 50 | Pl_XOR(char const* identifier, Pipeline* next, unsigned char key); |
| 51 | 51 | virtual ~Pl_XOR() = default; |
| 52 | - virtual void write(unsigned char const* data, size_t len) override; | |
| 53 | - virtual void finish() override; | |
| 52 | + void write(unsigned char const* data, size_t len) override; | |
| 53 | + void finish() override; | |
| 54 | 54 | |
| 55 | 55 | private: |
| 56 | 56 | unsigned char key; |
| ... | ... | @@ -92,9 +92,9 @@ class SF_XORDecode: public QPDFStreamFilter |
| 92 | 92 | // "uncompress" the stream by default. |
| 93 | 93 | public: |
| 94 | 94 | virtual ~SF_XORDecode() = default; |
| 95 | - virtual bool setDecodeParms(QPDFObjectHandle decode_parms) override; | |
| 96 | - virtual Pipeline* getDecodePipeline(Pipeline* next) override; | |
| 97 | - virtual bool isSpecializedCompression() override; | |
| 95 | + bool setDecodeParms(QPDFObjectHandle decode_parms) override; | |
| 96 | + Pipeline* getDecodePipeline(Pipeline* next) override; | |
| 97 | + bool isSpecializedCompression() override; | |
| 98 | 98 | |
| 99 | 99 | private: |
| 100 | 100 | unsigned char key; |
| ... | ... | @@ -200,7 +200,7 @@ class StreamReplacer: public QPDFObjectHandle::StreamDataProvider |
| 200 | 200 | public: |
| 201 | 201 | StreamReplacer(QPDF* pdf); |
| 202 | 202 | virtual ~StreamReplacer() = default; |
| 203 | - virtual void | |
| 203 | + void | |
| 204 | 204 | provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; |
| 205 | 205 | |
| 206 | 206 | void registerStream( | ... | ... |
examples/pdf-invert-images.cc
include/qpdf/QPDFWriter.hh
libqpdf/QPDF.cc
| ... | ... | @@ -61,41 +61,41 @@ namespace |
| 61 | 61 | { |
| 62 | 62 | public: |
| 63 | 63 | virtual ~InvalidInputSource() = default; |
| 64 | - virtual qpdf_offset_t | |
| 64 | + qpdf_offset_t | |
| 65 | 65 | findAndSkipNextEOL() override |
| 66 | 66 | { |
| 67 | 67 | throwException(); |
| 68 | 68 | return 0; |
| 69 | 69 | } |
| 70 | - virtual std::string const& | |
| 70 | + std::string const& | |
| 71 | 71 | getName() const override |
| 72 | 72 | { |
| 73 | 73 | static std::string name("closed input source"); |
| 74 | 74 | return name; |
| 75 | 75 | } |
| 76 | - virtual qpdf_offset_t | |
| 76 | + qpdf_offset_t | |
| 77 | 77 | tell() override |
| 78 | 78 | { |
| 79 | 79 | throwException(); |
| 80 | 80 | return 0; |
| 81 | 81 | } |
| 82 | - virtual void | |
| 82 | + void | |
| 83 | 83 | seek(qpdf_offset_t offset, int whence) override |
| 84 | 84 | { |
| 85 | 85 | throwException(); |
| 86 | 86 | } |
| 87 | - virtual void | |
| 87 | + void | |
| 88 | 88 | rewind() override |
| 89 | 89 | { |
| 90 | 90 | throwException(); |
| 91 | 91 | } |
| 92 | - virtual size_t | |
| 92 | + size_t | |
| 93 | 93 | read(char* buffer, size_t length) override |
| 94 | 94 | { |
| 95 | 95 | throwException(); |
| 96 | 96 | return 0; |
| 97 | 97 | } |
| 98 | - virtual void | |
| 98 | + void | |
| 99 | 99 | unreadCh(char ch) override |
| 100 | 100 | { |
| 101 | 101 | throwException(); | ... | ... |
libqpdf/QPDFLogger.cc
| ... | ... | @@ -17,14 +17,14 @@ namespace |
| 17 | 17 | { |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - virtual void | |
| 20 | + void | |
| 21 | 21 | write(unsigned char const* data, size_t len) override |
| 22 | 22 | { |
| 23 | 23 | this->used = true; |
| 24 | 24 | getNext()->write(data, len); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - virtual void | |
| 27 | + void | |
| 28 | 28 | finish() override |
| 29 | 29 | { |
| 30 | 30 | getNext()->finish(); | ... | ... |
libqpdf/QPDFNameTreeObjectHelper.cc
| ... | ... | @@ -7,18 +7,18 @@ namespace |
| 7 | 7 | class NameTreeDetails: public NNTreeDetails |
| 8 | 8 | { |
| 9 | 9 | public: |
| 10 | - virtual std::string const& | |
| 10 | + std::string const& | |
| 11 | 11 | itemsKey() const override |
| 12 | 12 | { |
| 13 | 13 | static std::string k("/Names"); |
| 14 | 14 | return k; |
| 15 | 15 | } |
| 16 | - virtual bool | |
| 16 | + bool | |
| 17 | 17 | keyValid(QPDFObjectHandle oh) const override |
| 18 | 18 | { |
| 19 | 19 | return oh.isString(); |
| 20 | 20 | } |
| 21 | - virtual int | |
| 21 | + int | |
| 22 | 22 | compareKeys(QPDFObjectHandle a, QPDFObjectHandle b) const override |
| 23 | 23 | { |
| 24 | 24 | if (!(keyValid(a) && keyValid(b))) { | ... | ... |
libqpdf/QPDFNumberTreeObjectHelper.cc
| ... | ... | @@ -8,18 +8,18 @@ namespace |
| 8 | 8 | class NumberTreeDetails: public NNTreeDetails |
| 9 | 9 | { |
| 10 | 10 | public: |
| 11 | - virtual std::string const& | |
| 11 | + std::string const& | |
| 12 | 12 | itemsKey() const override |
| 13 | 13 | { |
| 14 | 14 | static std::string k("/Nums"); |
| 15 | 15 | return k; |
| 16 | 16 | } |
| 17 | - virtual bool | |
| 17 | + bool | |
| 18 | 18 | keyValid(QPDFObjectHandle oh) const override |
| 19 | 19 | { |
| 20 | 20 | return oh.isInteger(); |
| 21 | 21 | } |
| 22 | - virtual int | |
| 22 | + int | |
| 23 | 23 | compareKeys(QPDFObjectHandle a, QPDFObjectHandle b) const override |
| 24 | 24 | { |
| 25 | 25 | if (!(keyValid(a) && keyValid(b))) { | ... | ... |
libqpdf/QPDFObjectHandle.cc
| ... | ... | @@ -1446,13 +1446,13 @@ namespace |
| 1446 | 1446 | { |
| 1447 | 1447 | } |
| 1448 | 1448 | |
| 1449 | - virtual void | |
| 1449 | + void | |
| 1450 | 1450 | provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override |
| 1451 | 1451 | { |
| 1452 | 1452 | p1(pipeline); |
| 1453 | 1453 | } |
| 1454 | 1454 | |
| 1455 | - virtual bool | |
| 1455 | + bool | |
| 1456 | 1456 | provideStreamData( |
| 1457 | 1457 | QPDFObjGen const&, |
| 1458 | 1458 | Pipeline* pipeline, | ... | ... |
libqpdf/QPDF_json.cc
| ... | ... | @@ -242,13 +242,13 @@ class QPDF::JSONReactor: public JSON::Reactor |
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | virtual ~JSONReactor() = default; |
| 245 | - virtual void dictionaryStart() override; | |
| 246 | - virtual void arrayStart() override; | |
| 247 | - virtual void containerEnd(JSON const& value) override; | |
| 248 | - virtual void topLevelScalar() override; | |
| 249 | - virtual bool | |
| 245 | + void dictionaryStart() override; | |
| 246 | + void arrayStart() override; | |
| 247 | + void containerEnd(JSON const& value) override; | |
| 248 | + void topLevelScalar() override; | |
| 249 | + bool | |
| 250 | 250 | dictionaryItem(std::string const& key, JSON const& value) override; |
| 251 | - virtual bool arrayItem(JSON const& value) override; | |
| 251 | + bool arrayItem(JSON const& value) override; | |
| 252 | 252 | |
| 253 | 253 | bool anyErrors() const; |
| 254 | 254 | ... | ... |
libqpdf/qpdf/Pl_Base64.hh
| ... | ... | @@ -9,8 +9,8 @@ class Pl_Base64: public Pipeline |
| 9 | 9 | enum action_e { a_encode, a_decode }; |
| 10 | 10 | Pl_Base64(char const* identifier, Pipeline* next, action_e); |
| 11 | 11 | virtual ~Pl_Base64() = default; |
| 12 | - virtual void write(unsigned char const* buf, size_t len) override; | |
| 13 | - virtual void finish() override; | |
| 12 | + void write(unsigned char const* buf, size_t len) override; | |
| 13 | + void finish() override; | |
| 14 | 14 | |
| 15 | 15 | private: |
| 16 | 16 | void decode(unsigned char const* buf, size_t len); | ... | ... |
libqpdf/qpdf/ResourceFinder.hh
| ... | ... | @@ -8,8 +8,8 @@ class ResourceFinder: public QPDFObjectHandle::ParserCallbacks |
| 8 | 8 | public: |
| 9 | 9 | ResourceFinder(); |
| 10 | 10 | virtual ~ResourceFinder() = default; |
| 11 | - virtual void handleObject(QPDFObjectHandle, size_t, size_t) override; | |
| 12 | - virtual void handleEOF() override; | |
| 11 | + void handleObject(QPDFObjectHandle, size_t, size_t) override; | |
| 12 | + void handleEOF() override; | |
| 13 | 13 | std::set<std::string> const& getNames() const; |
| 14 | 14 | std::map<std::string, std::map<std::string, std::set<size_t>>> const& |
| 15 | 15 | getNamesByResourceType() const; | ... | ... |
libqpdf/qpdf/SF_ASCII85Decode.hh
libqpdf/qpdf/SF_ASCIIHexDecode.hh
libqpdf/qpdf/SF_DCTDecode.hh
| ... | ... | @@ -11,7 +11,7 @@ class SF_DCTDecode: public QPDFStreamFilter |
| 11 | 11 | SF_DCTDecode() = default; |
| 12 | 12 | virtual ~SF_DCTDecode() = default; |
| 13 | 13 | |
| 14 | - virtual Pipeline* | |
| 14 | + Pipeline* | |
| 15 | 15 | getDecodePipeline(Pipeline* next) override |
| 16 | 16 | { |
| 17 | 17 | this->pipeline = std::make_shared<Pl_DCT>("DCT decode", next); |
| ... | ... | @@ -24,13 +24,13 @@ class SF_DCTDecode: public QPDFStreamFilter |
| 24 | 24 | return std::make_shared<SF_DCTDecode>(); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - virtual bool | |
| 27 | + bool | |
| 28 | 28 | isSpecializedCompression() override |
| 29 | 29 | { |
| 30 | 30 | return true; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - virtual bool | |
| 33 | + bool | |
| 34 | 34 | isLossyCompression() override |
| 35 | 35 | { |
| 36 | 36 | return true; | ... | ... |
libqpdf/qpdf/SF_RunLengthDecode.hh
| ... | ... | @@ -11,7 +11,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter |
| 11 | 11 | SF_RunLengthDecode() = default; |
| 12 | 12 | virtual ~SF_RunLengthDecode() = default; |
| 13 | 13 | |
| 14 | - virtual Pipeline* | |
| 14 | + Pipeline* | |
| 15 | 15 | getDecodePipeline(Pipeline* next) override |
| 16 | 16 | { |
| 17 | 17 | this->pipeline = std::make_shared<Pl_RunLength>( |
| ... | ... | @@ -25,7 +25,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter |
| 25 | 25 | return std::make_shared<SF_RunLengthDecode>(); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - virtual bool | |
| 28 | + bool | |
| 29 | 29 | isSpecializedCompression() override |
| 30 | 30 | { |
| 31 | 31 | return true; | ... | ... |
libtests/json_parse.cc
| ... | ... | @@ -11,13 +11,13 @@ namespace |
| 11 | 11 | { |
| 12 | 12 | public: |
| 13 | 13 | virtual ~Reactor() = default; |
| 14 | - virtual void dictionaryStart() override; | |
| 15 | - virtual void arrayStart() override; | |
| 16 | - virtual void containerEnd(JSON const& value) override; | |
| 17 | - virtual void topLevelScalar() override; | |
| 18 | - virtual bool | |
| 14 | + void dictionaryStart() override; | |
| 15 | + void arrayStart() override; | |
| 16 | + void containerEnd(JSON const& value) override; | |
| 17 | + void topLevelScalar() override; | |
| 18 | + bool | |
| 19 | 19 | dictionaryItem(std::string const& key, JSON const& value) override; |
| 20 | - virtual bool arrayItem(JSON const& value) override; | |
| 20 | + bool arrayItem(JSON const& value) override; | |
| 21 | 21 | |
| 22 | 22 | private: |
| 23 | 23 | void printItem(JSON const&); | ... | ... |