Commit e6577a1323cd813a92ddbc8841e1342c05de071a
1 parent
ba5a3567
Replace 'virtual' specifier with 'override'
Showing
29 changed files
with
107 additions
and
107 deletions
examples/pdf-count-strings.cc
| @@ -30,9 +30,9 @@ class StringCounter: public QPDFObjectHandle::TokenFilter | @@ -30,9 +30,9 @@ class StringCounter: public QPDFObjectHandle::TokenFilter | ||
| 30 | count(0) | 30 | count(0) |
| 31 | { | 31 | { |
| 32 | } | 32 | } |
| 33 | - virtual ~StringCounter() = default; | ||
| 34 | - virtual void handleToken(QPDFTokenizer::Token const&); | ||
| 35 | - virtual void handleEOF(); | 33 | + ~StringCounter() override = default; |
| 34 | + void handleToken(QPDFTokenizer::Token const&) override; | ||
| 35 | + void handleEOF() override; | ||
| 36 | int getCount() const; | 36 | int getCount() const; |
| 37 | 37 | ||
| 38 | private: | 38 | private: |
examples/pdf-create.cc
| @@ -26,8 +26,8 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider | @@ -26,8 +26,8 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider | ||
| 26 | { | 26 | { |
| 27 | public: | 27 | public: |
| 28 | ImageProvider(std::string const& color_space, std::string const& filter); | 28 | ImageProvider(std::string const& color_space, std::string const& filter); |
| 29 | - virtual ~ImageProvider() = default; | ||
| 30 | - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); | 29 | + ~ImageProvider() override = default; |
| 30 | + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override; | ||
| 31 | size_t getWidth() const; | 31 | size_t getWidth() const; |
| 32 | size_t getHeight() const; | 32 | size_t getHeight() const; |
| 33 | 33 |
examples/pdf-custom-filter.cc
| @@ -48,7 +48,7 @@ class Pl_XOR: public Pipeline | @@ -48,7 +48,7 @@ class Pl_XOR: public Pipeline | ||
| 48 | 48 | ||
| 49 | public: | 49 | public: |
| 50 | Pl_XOR(char const* identifier, Pipeline* next, unsigned char key); | 50 | Pl_XOR(char const* identifier, Pipeline* next, unsigned char key); |
| 51 | - virtual ~Pl_XOR() = default; | 51 | + ~Pl_XOR() override = default; |
| 52 | void write(unsigned char const* data, size_t len) override; | 52 | void write(unsigned char const* data, size_t len) override; |
| 53 | void finish() override; | 53 | void finish() override; |
| 54 | 54 | ||
| @@ -91,7 +91,7 @@ class SF_XORDecode: public QPDFStreamFilter | @@ -91,7 +91,7 @@ class SF_XORDecode: public QPDFStreamFilter | ||
| 91 | // filter, which just means QPDF assumes that it should not | 91 | // filter, which just means QPDF assumes that it should not |
| 92 | // "uncompress" the stream by default. | 92 | // "uncompress" the stream by default. |
| 93 | public: | 93 | public: |
| 94 | - virtual ~SF_XORDecode() = default; | 94 | + ~SF_XORDecode() override = default; |
| 95 | bool setDecodeParms(QPDFObjectHandle decode_parms) override; | 95 | bool setDecodeParms(QPDFObjectHandle decode_parms) override; |
| 96 | Pipeline* getDecodePipeline(Pipeline* next) override; | 96 | Pipeline* getDecodePipeline(Pipeline* next) override; |
| 97 | bool isSpecializedCompression() override; | 97 | bool isSpecializedCompression() override; |
| @@ -199,7 +199,7 @@ class StreamReplacer: public QPDFObjectHandle::StreamDataProvider | @@ -199,7 +199,7 @@ class StreamReplacer: public QPDFObjectHandle::StreamDataProvider | ||
| 199 | 199 | ||
| 200 | public: | 200 | public: |
| 201 | StreamReplacer(QPDF* pdf); | 201 | StreamReplacer(QPDF* pdf); |
| 202 | - virtual ~StreamReplacer() = default; | 202 | + ~StreamReplacer() override = default; |
| 203 | void | 203 | void |
| 204 | provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; | 204 | provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; |
| 205 | 205 |
examples/pdf-filter-tokens.cc
| @@ -33,8 +33,8 @@ usage() | @@ -33,8 +33,8 @@ usage() | ||
| 33 | class StringReverser: public QPDFObjectHandle::TokenFilter | 33 | class StringReverser: public QPDFObjectHandle::TokenFilter |
| 34 | { | 34 | { |
| 35 | public: | 35 | public: |
| 36 | - virtual ~StringReverser() = default; | ||
| 37 | - virtual void handleToken(QPDFTokenizer::Token const&); | 36 | + ~StringReverser() override = default; |
| 37 | + void handleToken(QPDFTokenizer::Token const&) override; | ||
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | void | 40 | void |
| @@ -66,9 +66,9 @@ StringReverser::handleToken(QPDFTokenizer::Token const& token) | @@ -66,9 +66,9 @@ StringReverser::handleToken(QPDFTokenizer::Token const& token) | ||
| 66 | class ColorToGray: public QPDFObjectHandle::TokenFilter | 66 | class ColorToGray: public QPDFObjectHandle::TokenFilter |
| 67 | { | 67 | { |
| 68 | public: | 68 | public: |
| 69 | - virtual ~ColorToGray() = default; | ||
| 70 | - virtual void handleToken(QPDFTokenizer::Token const&); | ||
| 71 | - virtual void handleEOF(); | 69 | + ~ColorToGray() override = default; |
| 70 | + void handleToken(QPDFTokenizer::Token const&) override; | ||
| 71 | + void handleEOF() override; | ||
| 72 | 72 | ||
| 73 | private: | 73 | private: |
| 74 | bool isNumeric(QPDFTokenizer::token_type_e); | 74 | bool isNumeric(QPDFTokenizer::token_type_e); |
examples/pdf-invert-images.cc
| @@ -33,7 +33,7 @@ usage() | @@ -33,7 +33,7 @@ usage() | ||
| 33 | class ImageInverter: public QPDFObjectHandle::StreamDataProvider | 33 | class ImageInverter: public QPDFObjectHandle::StreamDataProvider |
| 34 | { | 34 | { |
| 35 | public: | 35 | public: |
| 36 | - virtual ~ImageInverter() = default; | 36 | + ~ImageInverter() override = default; |
| 37 | void | 37 | void |
| 38 | provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; | 38 | provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; |
| 39 | 39 |
examples/pdf-parse-content.cc
| @@ -22,10 +22,10 @@ usage() | @@ -22,10 +22,10 @@ usage() | ||
| 22 | class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks | 22 | class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks |
| 23 | { | 23 | { |
| 24 | public: | 24 | public: |
| 25 | - virtual ~ParserCallbacks() = default; | ||
| 26 | - virtual void contentSize(size_t); | ||
| 27 | - virtual void handleObject(QPDFObjectHandle, size_t offset, size_t length); | ||
| 28 | - virtual void handleEOF(); | 25 | + ~ParserCallbacks() override = default; |
| 26 | + void contentSize(size_t) override; | ||
| 27 | + void handleObject(QPDFObjectHandle, size_t offset, size_t length) override; | ||
| 28 | + void handleEOF() override; | ||
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | void | 31 | void |
fuzz/qpdf_fuzzer.cc
| @@ -14,13 +14,13 @@ | @@ -14,13 +14,13 @@ | ||
| 14 | class DiscardContents: public QPDFObjectHandle::ParserCallbacks | 14 | class DiscardContents: public QPDFObjectHandle::ParserCallbacks |
| 15 | { | 15 | { |
| 16 | public: | 16 | public: |
| 17 | - virtual ~DiscardContents() = default; | ||
| 18 | - virtual void | ||
| 19 | - handleObject(QPDFObjectHandle) | 17 | + ~DiscardContents() override = default; |
| 18 | + void | ||
| 19 | + handleObject(QPDFObjectHandle) override | ||
| 20 | { | 20 | { |
| 21 | } | 21 | } |
| 22 | - virtual void | ||
| 23 | - handleEOF() | 22 | + void |
| 23 | + handleEOF() override | ||
| 24 | { | 24 | { |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
include/qpdf/JSON.hh
| @@ -369,8 +369,8 @@ class JSON | @@ -369,8 +369,8 @@ class JSON | ||
| 369 | JSON_value(vt_dictionary) | 369 | JSON_value(vt_dictionary) |
| 370 | { | 370 | { |
| 371 | } | 371 | } |
| 372 | - virtual ~JSON_dictionary() = default; | ||
| 373 | - virtual void write(Pipeline*, size_t depth) const; | 372 | + ~JSON_dictionary() override = default; |
| 373 | + void write(Pipeline*, size_t depth) const override; | ||
| 374 | std::map<std::string, JSON> members; | 374 | std::map<std::string, JSON> members; |
| 375 | std::set<std::string> parsed_keys; | 375 | std::set<std::string> parsed_keys; |
| 376 | }; | 376 | }; |
| @@ -380,15 +380,15 @@ class JSON | @@ -380,15 +380,15 @@ class JSON | ||
| 380 | JSON_value(vt_array) | 380 | JSON_value(vt_array) |
| 381 | { | 381 | { |
| 382 | } | 382 | } |
| 383 | - virtual ~JSON_array() = default; | ||
| 384 | - virtual void write(Pipeline*, size_t depth) const; | 383 | + ~JSON_array() override = default; |
| 384 | + void write(Pipeline*, size_t depth) const override; | ||
| 385 | std::vector<JSON> elements; | 385 | std::vector<JSON> elements; |
| 386 | }; | 386 | }; |
| 387 | struct JSON_string: public JSON_value | 387 | struct JSON_string: public JSON_value |
| 388 | { | 388 | { |
| 389 | JSON_string(std::string const& utf8); | 389 | JSON_string(std::string const& utf8); |
| 390 | - virtual ~JSON_string() = default; | ||
| 391 | - virtual void write(Pipeline*, size_t depth) const; | 390 | + ~JSON_string() override = default; |
| 391 | + void write(Pipeline*, size_t depth) const override; | ||
| 392 | std::string utf8; | 392 | std::string utf8; |
| 393 | std::string encoded; | 393 | std::string encoded; |
| 394 | }; | 394 | }; |
| @@ -397,15 +397,15 @@ class JSON | @@ -397,15 +397,15 @@ class JSON | ||
| 397 | JSON_number(long long val); | 397 | JSON_number(long long val); |
| 398 | JSON_number(double val); | 398 | JSON_number(double val); |
| 399 | JSON_number(std::string const& val); | 399 | JSON_number(std::string const& val); |
| 400 | - virtual ~JSON_number() = default; | ||
| 401 | - virtual void write(Pipeline*, size_t depth) const; | 400 | + ~JSON_number() override = default; |
| 401 | + void write(Pipeline*, size_t depth) const override; | ||
| 402 | std::string encoded; | 402 | std::string encoded; |
| 403 | }; | 403 | }; |
| 404 | struct JSON_bool: public JSON_value | 404 | struct JSON_bool: public JSON_value |
| 405 | { | 405 | { |
| 406 | JSON_bool(bool val); | 406 | JSON_bool(bool val); |
| 407 | - virtual ~JSON_bool() = default; | ||
| 408 | - virtual void write(Pipeline*, size_t depth) const; | 407 | + ~JSON_bool() override = default; |
| 408 | + void write(Pipeline*, size_t depth) const override; | ||
| 409 | bool value; | 409 | bool value; |
| 410 | }; | 410 | }; |
| 411 | struct JSON_null: public JSON_value | 411 | struct JSON_null: public JSON_value |
| @@ -414,14 +414,14 @@ class JSON | @@ -414,14 +414,14 @@ class JSON | ||
| 414 | JSON_value(vt_null) | 414 | JSON_value(vt_null) |
| 415 | { | 415 | { |
| 416 | } | 416 | } |
| 417 | - virtual ~JSON_null() = default; | ||
| 418 | - virtual void write(Pipeline*, size_t depth) const; | 417 | + ~JSON_null() override = default; |
| 418 | + void write(Pipeline*, size_t depth) const override; | ||
| 419 | }; | 419 | }; |
| 420 | struct JSON_blob: public JSON_value | 420 | struct JSON_blob: public JSON_value |
| 421 | { | 421 | { |
| 422 | JSON_blob(std::function<void(Pipeline*)> fn); | 422 | JSON_blob(std::function<void(Pipeline*)> fn); |
| 423 | - virtual ~JSON_blob() = default; | ||
| 424 | - virtual void write(Pipeline*, size_t depth) const; | 423 | + ~JSON_blob() override = default; |
| 424 | + void write(Pipeline*, size_t depth) const override; | ||
| 425 | std::function<void(Pipeline*)> fn; | 425 | std::function<void(Pipeline*)> fn; |
| 426 | }; | 426 | }; |
| 427 | 427 |
include/qpdf/Pl_Buffer.hh
| @@ -45,11 +45,11 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline | @@ -45,11 +45,11 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline | ||
| 45 | QPDF_DLL | 45 | QPDF_DLL |
| 46 | Pl_Buffer(char const* identifier, Pipeline* next = nullptr); | 46 | Pl_Buffer(char const* identifier, Pipeline* next = nullptr); |
| 47 | QPDF_DLL | 47 | QPDF_DLL |
| 48 | - virtual ~Pl_Buffer(); | 48 | + ~Pl_Buffer() override; |
| 49 | QPDF_DLL | 49 | QPDF_DLL |
| 50 | - virtual void write(unsigned char const*, size_t); | 50 | + void write(unsigned char const*, size_t) override; |
| 51 | QPDF_DLL | 51 | QPDF_DLL |
| 52 | - virtual void finish(); | 52 | + void finish() override; |
| 53 | 53 | ||
| 54 | // Each call to getBuffer() resets this object -- see notes above. | 54 | // Each call to getBuffer() resets this object -- see notes above. |
| 55 | // The caller is responsible for deleting the returned Buffer | 55 | // The caller is responsible for deleting the returned Buffer |
libqpdf/QPDF.cc
| @@ -60,7 +60,7 @@ namespace | @@ -60,7 +60,7 @@ namespace | ||
| 60 | class InvalidInputSource: public InputSource | 60 | class InvalidInputSource: public InputSource |
| 61 | { | 61 | { |
| 62 | public: | 62 | public: |
| 63 | - virtual ~InvalidInputSource() = default; | 63 | + ~InvalidInputSource() override = default; |
| 64 | qpdf_offset_t | 64 | qpdf_offset_t |
| 65 | findAndSkipNextEOL() override | 65 | findAndSkipNextEOL() override |
| 66 | { | 66 | { |
libqpdf/QPDFFormFieldObjectHelper.cc
| @@ -515,9 +515,9 @@ namespace | @@ -515,9 +515,9 @@ namespace | ||
| 515 | std::vector<std::string> const& opt, | 515 | std::vector<std::string> const& opt, |
| 516 | double tf, | 516 | double tf, |
| 517 | QPDFObjectHandle::Rectangle const& bbox); | 517 | QPDFObjectHandle::Rectangle const& bbox); |
| 518 | - virtual ~ValueSetter() = default; | ||
| 519 | - virtual void handleToken(QPDFTokenizer::Token const&); | ||
| 520 | - virtual void handleEOF(); | 518 | + ~ValueSetter() override = default; |
| 519 | + void handleToken(QPDFTokenizer::Token const&) override; | ||
| 520 | + void handleEOF() override; | ||
| 521 | void writeAppearance(); | 521 | void writeAppearance(); |
| 522 | 522 | ||
| 523 | private: | 523 | private: |
| @@ -706,10 +706,10 @@ namespace | @@ -706,10 +706,10 @@ namespace | ||
| 706 | { | 706 | { |
| 707 | public: | 707 | public: |
| 708 | TfFinder(); | 708 | TfFinder(); |
| 709 | - virtual ~TfFinder() | 709 | + ~TfFinder() override |
| 710 | { | 710 | { |
| 711 | } | 711 | } |
| 712 | - virtual void handleToken(QPDFTokenizer::Token const&); | 712 | + void handleToken(QPDFTokenizer::Token const&) override; |
| 713 | double getTf(); | 713 | double getTf(); |
| 714 | std::string getFontName(); | 714 | std::string getFontName(); |
| 715 | std::string getDA(); | 715 | std::string getDA(); |
libqpdf/QPDFJob.cc
| @@ -48,8 +48,8 @@ namespace | @@ -48,8 +48,8 @@ namespace | ||
| 48 | size_t oi_min_height, | 48 | size_t oi_min_height, |
| 49 | size_t oi_min_area, | 49 | size_t oi_min_area, |
| 50 | QPDFObjectHandle& image); | 50 | QPDFObjectHandle& image); |
| 51 | - virtual ~ImageOptimizer() = default; | ||
| 52 | - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); | 51 | + ~ImageOptimizer() override = default; |
| 52 | + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override; | ||
| 53 | std::shared_ptr<Pipeline> | 53 | std::shared_ptr<Pipeline> |
| 54 | makePipeline(std::string const& description, Pipeline* next); | 54 | makePipeline(std::string const& description, Pipeline* next); |
| 55 | bool evaluate(std::string const& description); | 55 | bool evaluate(std::string const& description); |
| @@ -65,13 +65,13 @@ namespace | @@ -65,13 +65,13 @@ namespace | ||
| 65 | class DiscardContents: public QPDFObjectHandle::ParserCallbacks | 65 | class DiscardContents: public QPDFObjectHandle::ParserCallbacks |
| 66 | { | 66 | { |
| 67 | public: | 67 | public: |
| 68 | - virtual ~DiscardContents() = default; | ||
| 69 | - virtual void | ||
| 70 | - handleObject(QPDFObjectHandle) | 68 | + ~DiscardContents() override = default; |
| 69 | + void | ||
| 70 | + handleObject(QPDFObjectHandle) override | ||
| 71 | { | 71 | { |
| 72 | } | 72 | } |
| 73 | - virtual void | ||
| 74 | - handleEOF() | 73 | + void |
| 74 | + handleEOF() override | ||
| 75 | { | 75 | { |
| 76 | } | 76 | } |
| 77 | }; | 77 | }; |
| @@ -98,8 +98,8 @@ namespace | @@ -98,8 +98,8 @@ namespace | ||
| 98 | filename(filename) | 98 | filename(filename) |
| 99 | { | 99 | { |
| 100 | } | 100 | } |
| 101 | - virtual ~ProgressReporter() = default; | ||
| 102 | - virtual void reportProgress(int); | 101 | + ~ProgressReporter() override = default; |
| 102 | + void reportProgress(int) override; | ||
| 103 | 103 | ||
| 104 | private: | 104 | private: |
| 105 | Pipeline& p; | 105 | Pipeline& p; |
libqpdf/QPDFObjectHandle.cc
| @@ -111,8 +111,8 @@ namespace | @@ -111,8 +111,8 @@ namespace | ||
| 111 | old_contents(old_contents) | 111 | old_contents(old_contents) |
| 112 | { | 112 | { |
| 113 | } | 113 | } |
| 114 | - virtual ~CoalesceProvider() = default; | ||
| 115 | - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); | 114 | + ~CoalesceProvider() override = default; |
| 115 | + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override; | ||
| 116 | 116 | ||
| 117 | private: | 117 | private: |
| 118 | QPDFObjectHandle containing_page; | 118 | QPDFObjectHandle containing_page; |
| @@ -200,9 +200,9 @@ namespace | @@ -200,9 +200,9 @@ namespace | ||
| 200 | { | 200 | { |
| 201 | public: | 201 | public: |
| 202 | LastChar(Pipeline* next); | 202 | LastChar(Pipeline* next); |
| 203 | - virtual ~LastChar() = default; | ||
| 204 | - virtual void write(unsigned char const* data, size_t len); | ||
| 205 | - virtual void finish(); | 203 | + ~LastChar() override = default; |
| 204 | + void write(unsigned char const* data, size_t len) override; | ||
| 205 | + void finish() override; | ||
| 206 | unsigned char getLastChar(); | 206 | unsigned char getLastChar(); |
| 207 | 207 | ||
| 208 | private: | 208 | private: |
libqpdf/QPDFTokenizer.cc
| @@ -35,8 +35,8 @@ namespace | @@ -35,8 +35,8 @@ namespace | ||
| 35 | str(str) | 35 | str(str) |
| 36 | { | 36 | { |
| 37 | } | 37 | } |
| 38 | - virtual ~QPDFWordTokenFinder() = default; | ||
| 39 | - virtual bool check(); | 38 | + ~QPDFWordTokenFinder() override = default; |
| 39 | + bool check() override; | ||
| 40 | 40 | ||
| 41 | private: | 41 | private: |
| 42 | std::shared_ptr<InputSource> is; | 42 | std::shared_ptr<InputSource> is; |
libqpdf/QPDF_Stream.cc
| @@ -27,10 +27,10 @@ namespace | @@ -27,10 +27,10 @@ namespace | ||
| 27 | { | 27 | { |
| 28 | public: | 28 | public: |
| 29 | SF_Crypt() = default; | 29 | SF_Crypt() = default; |
| 30 | - virtual ~SF_Crypt() = default; | 30 | + ~SF_Crypt() override = default; |
| 31 | 31 | ||
| 32 | - virtual bool | ||
| 33 | - setDecodeParms(QPDFObjectHandle decode_parms) | 32 | + bool |
| 33 | + setDecodeParms(QPDFObjectHandle decode_parms) override | ||
| 34 | { | 34 | { |
| 35 | if (decode_parms.isNull()) { | 35 | if (decode_parms.isNull()) { |
| 36 | return true; | 36 | return true; |
| @@ -49,8 +49,8 @@ namespace | @@ -49,8 +49,8 @@ namespace | ||
| 49 | return filterable; | 49 | return filterable; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | - virtual Pipeline* | ||
| 53 | - getDecodePipeline(Pipeline*) | 52 | + Pipeline* |
| 53 | + getDecodePipeline(Pipeline*) override | ||
| 54 | { | 54 | { |
| 55 | // Not used -- handled by pipeStreamData | 55 | // Not used -- handled by pipeStreamData |
| 56 | return nullptr; | 56 | return nullptr; |
libqpdf/qpdf/ContentNormalizer.hh
| @@ -7,8 +7,8 @@ class ContentNormalizer: public QPDFObjectHandle::TokenFilter | @@ -7,8 +7,8 @@ class ContentNormalizer: public QPDFObjectHandle::TokenFilter | ||
| 7 | { | 7 | { |
| 8 | public: | 8 | public: |
| 9 | ContentNormalizer(); | 9 | ContentNormalizer(); |
| 10 | - virtual ~ContentNormalizer() = default; | ||
| 11 | - virtual void handleToken(QPDFTokenizer::Token const&); | 10 | + ~ContentNormalizer() override = default; |
| 11 | + void handleToken(QPDFTokenizer::Token const&) override; | ||
| 12 | 12 | ||
| 13 | bool anyBadTokens() const; | 13 | bool anyBadTokens() const; |
| 14 | bool lastTokenWasBad() const; | 14 | bool lastTokenWasBad() const; |
libqpdf/qpdf/CryptoRandomDataProvider.hh
| @@ -7,8 +7,8 @@ class CryptoRandomDataProvider: public RandomDataProvider | @@ -7,8 +7,8 @@ class CryptoRandomDataProvider: public RandomDataProvider | ||
| 7 | { | 7 | { |
| 8 | public: | 8 | public: |
| 9 | CryptoRandomDataProvider() = default; | 9 | CryptoRandomDataProvider() = default; |
| 10 | - virtual ~CryptoRandomDataProvider() = default; | ||
| 11 | - virtual void provideRandomData(unsigned char* data, size_t len); | 10 | + ~CryptoRandomDataProvider() override = default; |
| 11 | + void provideRandomData(unsigned char* data, size_t len) override; | ||
| 12 | static RandomDataProvider* getInstance(); | 12 | static RandomDataProvider* getInstance(); |
| 13 | }; | 13 | }; |
| 14 | 14 |
libqpdf/qpdf/InsecureRandomDataProvider.hh
| @@ -7,8 +7,8 @@ class InsecureRandomDataProvider: public RandomDataProvider | @@ -7,8 +7,8 @@ class InsecureRandomDataProvider: public RandomDataProvider | ||
| 7 | { | 7 | { |
| 8 | public: | 8 | public: |
| 9 | InsecureRandomDataProvider(); | 9 | InsecureRandomDataProvider(); |
| 10 | - virtual ~InsecureRandomDataProvider() = default; | ||
| 11 | - virtual void provideRandomData(unsigned char* data, size_t len); | 10 | + ~InsecureRandomDataProvider() override = default; |
| 11 | + void provideRandomData(unsigned char* data, size_t len) override; | ||
| 12 | static RandomDataProvider* getInstance(); | 12 | static RandomDataProvider* getInstance(); |
| 13 | 13 | ||
| 14 | private: | 14 | private: |
libqpdf/qpdf/OffsetInputSource.hh
| @@ -11,15 +11,15 @@ class OffsetInputSource: public InputSource | @@ -11,15 +11,15 @@ class OffsetInputSource: public InputSource | ||
| 11 | public: | 11 | public: |
| 12 | OffsetInputSource( | 12 | OffsetInputSource( |
| 13 | std::shared_ptr<InputSource>, qpdf_offset_t global_offset); | 13 | std::shared_ptr<InputSource>, qpdf_offset_t global_offset); |
| 14 | - virtual ~OffsetInputSource() = default; | 14 | + ~OffsetInputSource() override = default; |
| 15 | 15 | ||
| 16 | - virtual qpdf_offset_t findAndSkipNextEOL(); | ||
| 17 | - virtual std::string const& getName() const; | ||
| 18 | - virtual qpdf_offset_t tell(); | ||
| 19 | - virtual void seek(qpdf_offset_t offset, int whence); | ||
| 20 | - virtual void rewind(); | ||
| 21 | - virtual size_t read(char* buffer, size_t length); | ||
| 22 | - virtual void unreadCh(char ch); | 16 | + qpdf_offset_t findAndSkipNextEOL() override; |
| 17 | + std::string const& getName() const override; | ||
| 18 | + qpdf_offset_t tell() override; | ||
| 19 | + void seek(qpdf_offset_t offset, int whence) override; | ||
| 20 | + void rewind() override; | ||
| 21 | + size_t read(char* buffer, size_t length) override; | ||
| 22 | + void unreadCh(char ch) override; | ||
| 23 | 23 | ||
| 24 | private: | 24 | private: |
| 25 | std::shared_ptr<InputSource> proxied; | 25 | std::shared_ptr<InputSource> proxied; |
libqpdf/qpdf/Pl_AES_PDF.hh
| @@ -18,10 +18,10 @@ class Pl_AES_PDF: public Pipeline | @@ -18,10 +18,10 @@ class Pl_AES_PDF: public Pipeline | ||
| 18 | bool encrypt, | 18 | bool encrypt, |
| 19 | unsigned char const* key, | 19 | unsigned char const* key, |
| 20 | size_t key_bytes); | 20 | size_t key_bytes); |
| 21 | - virtual ~Pl_AES_PDF() = default; | 21 | + ~Pl_AES_PDF() override = default; |
| 22 | 22 | ||
| 23 | - virtual void write(unsigned char const* data, size_t len); | ||
| 24 | - virtual void finish(); | 23 | + void write(unsigned char const* data, size_t len) override; |
| 24 | + void finish() override; | ||
| 25 | 25 | ||
| 26 | // Use zero initialization vector; needed for AESV3 | 26 | // Use zero initialization vector; needed for AESV3 |
| 27 | void useZeroIV(); | 27 | void useZeroIV(); |
libqpdf/qpdf/Pl_ASCII85Decoder.hh
| @@ -7,9 +7,9 @@ class Pl_ASCII85Decoder: public Pipeline | @@ -7,9 +7,9 @@ class Pl_ASCII85Decoder: public Pipeline | ||
| 7 | { | 7 | { |
| 8 | public: | 8 | public: |
| 9 | Pl_ASCII85Decoder(char const* identifier, Pipeline* next); | 9 | Pl_ASCII85Decoder(char const* identifier, Pipeline* next); |
| 10 | - virtual ~Pl_ASCII85Decoder() = default; | ||
| 11 | - virtual void write(unsigned char const* buf, size_t len); | ||
| 12 | - virtual void finish(); | 10 | + ~Pl_ASCII85Decoder() override = default; |
| 11 | + void write(unsigned char const* buf, size_t len) override; | ||
| 12 | + void finish() override; | ||
| 13 | 13 | ||
| 14 | private: | 14 | private: |
| 15 | void flush(); | 15 | void flush(); |
libqpdf/qpdf/Pl_ASCIIHexDecoder.hh
| @@ -7,9 +7,9 @@ class Pl_ASCIIHexDecoder: public Pipeline | @@ -7,9 +7,9 @@ class Pl_ASCIIHexDecoder: public Pipeline | ||
| 7 | { | 7 | { |
| 8 | public: | 8 | public: |
| 9 | Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); | 9 | Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); |
| 10 | - virtual ~Pl_ASCIIHexDecoder() = default; | ||
| 11 | - virtual void write(unsigned char const* buf, size_t len); | ||
| 12 | - virtual void finish(); | 10 | + ~Pl_ASCIIHexDecoder() override = default; |
| 11 | + void write(unsigned char const* buf, size_t len) override; | ||
| 12 | + void finish() override; | ||
| 13 | 13 | ||
| 14 | private: | 14 | private: |
| 15 | void flush(); | 15 | void flush(); |
libqpdf/qpdf/Pl_Base64.hh
| @@ -8,7 +8,7 @@ class Pl_Base64: public Pipeline | @@ -8,7 +8,7 @@ class Pl_Base64: public Pipeline | ||
| 8 | public: | 8 | public: |
| 9 | enum action_e { a_encode, a_decode }; | 9 | enum action_e { a_encode, a_decode }; |
| 10 | Pl_Base64(char const* identifier, Pipeline* next, action_e); | 10 | Pl_Base64(char const* identifier, Pipeline* next, action_e); |
| 11 | - virtual ~Pl_Base64() = default; | 11 | + ~Pl_Base64() override = default; |
| 12 | void write(unsigned char const* buf, size_t len) override; | 12 | void write(unsigned char const* buf, size_t len) override; |
| 13 | void finish() override; | 13 | void finish() override; |
| 14 | 14 |
libqpdf/qpdf/Pl_PNGFilter.hh
| @@ -22,10 +22,10 @@ class Pl_PNGFilter: public Pipeline | @@ -22,10 +22,10 @@ class Pl_PNGFilter: public Pipeline | ||
| 22 | unsigned int columns, | 22 | unsigned int columns, |
| 23 | unsigned int samples_per_pixel = 1, | 23 | unsigned int samples_per_pixel = 1, |
| 24 | unsigned int bits_per_sample = 8); | 24 | unsigned int bits_per_sample = 8); |
| 25 | - virtual ~Pl_PNGFilter() = default; | 25 | + ~Pl_PNGFilter() override = default; |
| 26 | 26 | ||
| 27 | - virtual void write(unsigned char const* data, size_t len); | ||
| 28 | - virtual void finish(); | 27 | + void write(unsigned char const* data, size_t len) override; |
| 28 | + void finish() override; | ||
| 29 | 29 | ||
| 30 | private: | 30 | private: |
| 31 | void decodeSub(); | 31 | void decodeSub(); |
libqpdf/qpdf/Pl_RC4.hh
| @@ -17,10 +17,10 @@ class Pl_RC4: public Pipeline | @@ -17,10 +17,10 @@ class Pl_RC4: public Pipeline | ||
| 17 | unsigned char const* key_data, | 17 | unsigned char const* key_data, |
| 18 | int key_len = -1, | 18 | int key_len = -1, |
| 19 | size_t out_bufsize = def_bufsize); | 19 | size_t out_bufsize = def_bufsize); |
| 20 | - virtual ~Pl_RC4() = default; | 20 | + ~Pl_RC4() override = default; |
| 21 | 21 | ||
| 22 | - virtual void write(unsigned char const* data, size_t len); | ||
| 23 | - virtual void finish(); | 22 | + void write(unsigned char const* data, size_t len) override; |
| 23 | + void finish() override; | ||
| 24 | 24 | ||
| 25 | private: | 25 | private: |
| 26 | std::shared_ptr<unsigned char> outbuf; | 26 | std::shared_ptr<unsigned char> outbuf; |
libqpdf/qpdf/Pl_SHA2.hh
| @@ -21,9 +21,9 @@ class Pl_SHA2: public Pipeline | @@ -21,9 +21,9 @@ class Pl_SHA2: public Pipeline | ||
| 21 | { | 21 | { |
| 22 | public: | 22 | public: |
| 23 | Pl_SHA2(int bits = 0, Pipeline* next = nullptr); | 23 | Pl_SHA2(int bits = 0, Pipeline* next = nullptr); |
| 24 | - virtual ~Pl_SHA2() = default; | ||
| 25 | - virtual void write(unsigned char const*, size_t); | ||
| 26 | - virtual void finish(); | 24 | + ~Pl_SHA2() override = default; |
| 25 | + void write(unsigned char const*, size_t) override; | ||
| 26 | + void finish() override; | ||
| 27 | void resetBits(int bits); | 27 | void resetBits(int bits); |
| 28 | std::string getHexDigest(); | 28 | std::string getHexDigest(); |
| 29 | std::string getRawDigest(); | 29 | std::string getRawDigest(); |
libqpdf/qpdf/Pl_TIFFPredictor.hh
| @@ -18,10 +18,10 @@ class Pl_TIFFPredictor: public Pipeline | @@ -18,10 +18,10 @@ class Pl_TIFFPredictor: public Pipeline | ||
| 18 | unsigned int columns, | 18 | unsigned int columns, |
| 19 | unsigned int samples_per_pixel = 1, | 19 | unsigned int samples_per_pixel = 1, |
| 20 | unsigned int bits_per_sample = 8); | 20 | unsigned int bits_per_sample = 8); |
| 21 | - virtual ~Pl_TIFFPredictor() = default; | 21 | + ~Pl_TIFFPredictor() override = default; |
| 22 | 22 | ||
| 23 | - virtual void write(unsigned char const* data, size_t len); | ||
| 24 | - virtual void finish(); | 23 | + void write(unsigned char const* data, size_t len) override; |
| 24 | + void finish() override; | ||
| 25 | 25 | ||
| 26 | private: | 26 | private: |
| 27 | void processRow(); | 27 | void processRow(); |
libtests/dct_compress.cc
| @@ -22,8 +22,8 @@ class Callback: public Pl_DCT::CompressConfig | @@ -22,8 +22,8 @@ class Callback: public Pl_DCT::CompressConfig | ||
| 22 | called(false) | 22 | called(false) |
| 23 | { | 23 | { |
| 24 | } | 24 | } |
| 25 | - virtual ~Callback() = default; | ||
| 26 | - virtual void apply(jpeg_compress_struct*); | 25 | + ~Callback() override = default; |
| 26 | + void apply(jpeg_compress_struct*) override; | ||
| 27 | bool called; | 27 | bool called; |
| 28 | }; | 28 | }; |
| 29 | 29 |
libtests/input_source.cc
| @@ -24,8 +24,8 @@ class Finder: public InputSource::Finder | @@ -24,8 +24,8 @@ class Finder: public InputSource::Finder | ||
| 24 | after(after) | 24 | after(after) |
| 25 | { | 25 | { |
| 26 | } | 26 | } |
| 27 | - virtual ~Finder() = default; | ||
| 28 | - virtual bool check(); | 27 | + ~Finder() override = default; |
| 28 | + bool check() override; | ||
| 29 | 29 | ||
| 30 | private: | 30 | private: |
| 31 | std::shared_ptr<InputSource> is; | 31 | std::shared_ptr<InputSource> is; |