From e6577a1323cd813a92ddbc8841e1342c05de071a Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 20 May 2023 14:25:46 +0100 Subject: [PATCH] Replace 'virtual' specifier with 'override' --- examples/pdf-count-strings.cc | 6 ++--- examples/pdf-create.cc | 4 ++-- examples/pdf-custom-filter.cc | 6 ++--- examples/pdf-filter-tokens.cc | 10 ++++---- examples/pdf-invert-images.cc | 2 +- examples/pdf-parse-content.cc | 8 +++---- fuzz/qpdf_fuzzer.cc | 10 ++++---- include/qpdf/JSON.hh | 28 +++++++++++----------- include/qpdf/Pl_Buffer.hh | 6 ++--- libqpdf/QPDF.cc | 2 +- libqpdf/QPDFFormFieldObjectHelper.cc | 10 ++++---- libqpdf/QPDFJob.cc | 18 +++++++------- libqpdf/QPDFObjectHandle.cc | 10 ++++---- libqpdf/QPDFTokenizer.cc | 4 ++-- libqpdf/QPDF_Stream.cc | 10 ++++---- libqpdf/qpdf/ContentNormalizer.hh | 4 ++-- libqpdf/qpdf/CryptoRandomDataProvider.hh | 4 ++-- libqpdf/qpdf/InsecureRandomDataProvider.hh | 4 ++-- libqpdf/qpdf/OffsetInputSource.hh | 16 ++++++------- libqpdf/qpdf/Pl_AES_PDF.hh | 6 ++--- libqpdf/qpdf/Pl_ASCII85Decoder.hh | 6 ++--- libqpdf/qpdf/Pl_ASCIIHexDecoder.hh | 6 ++--- libqpdf/qpdf/Pl_Base64.hh | 2 +- libqpdf/qpdf/Pl_PNGFilter.hh | 6 ++--- libqpdf/qpdf/Pl_RC4.hh | 6 ++--- libqpdf/qpdf/Pl_SHA2.hh | 6 ++--- libqpdf/qpdf/Pl_TIFFPredictor.hh | 6 ++--- libtests/dct_compress.cc | 4 ++-- libtests/input_source.cc | 4 ++-- 29 files changed, 107 insertions(+), 107 deletions(-) diff --git a/examples/pdf-count-strings.cc b/examples/pdf-count-strings.cc index 584d630b..93676375 100644 --- a/examples/pdf-count-strings.cc +++ b/examples/pdf-count-strings.cc @@ -30,9 +30,9 @@ class StringCounter: public QPDFObjectHandle::TokenFilter count(0) { } - virtual ~StringCounter() = default; - virtual void handleToken(QPDFTokenizer::Token const&); - virtual void handleEOF(); + ~StringCounter() override = default; + void handleToken(QPDFTokenizer::Token const&) override; + void handleEOF() override; int getCount() const; private: diff --git a/examples/pdf-create.cc b/examples/pdf-create.cc index af7ec6b7..64ae5cb8 100644 --- a/examples/pdf-create.cc +++ b/examples/pdf-create.cc @@ -26,8 +26,8 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider { public: ImageProvider(std::string const& color_space, std::string const& filter); - virtual ~ImageProvider() = default; - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); + ~ImageProvider() override = default; + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override; size_t getWidth() const; size_t getHeight() const; diff --git a/examples/pdf-custom-filter.cc b/examples/pdf-custom-filter.cc index 30f02d5c..d99c6ab2 100644 --- a/examples/pdf-custom-filter.cc +++ b/examples/pdf-custom-filter.cc @@ -48,7 +48,7 @@ class Pl_XOR: public Pipeline public: Pl_XOR(char const* identifier, Pipeline* next, unsigned char key); - virtual ~Pl_XOR() = default; + ~Pl_XOR() override = default; void write(unsigned char const* data, size_t len) override; void finish() override; @@ -91,7 +91,7 @@ class SF_XORDecode: public QPDFStreamFilter // filter, which just means QPDF assumes that it should not // "uncompress" the stream by default. public: - virtual ~SF_XORDecode() = default; + ~SF_XORDecode() override = default; bool setDecodeParms(QPDFObjectHandle decode_parms) override; Pipeline* getDecodePipeline(Pipeline* next) override; bool isSpecializedCompression() override; @@ -199,7 +199,7 @@ class StreamReplacer: public QPDFObjectHandle::StreamDataProvider public: StreamReplacer(QPDF* pdf); - virtual ~StreamReplacer() = default; + ~StreamReplacer() override = default; void provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; diff --git a/examples/pdf-filter-tokens.cc b/examples/pdf-filter-tokens.cc index 173feb6a..a897ef65 100644 --- a/examples/pdf-filter-tokens.cc +++ b/examples/pdf-filter-tokens.cc @@ -33,8 +33,8 @@ usage() class StringReverser: public QPDFObjectHandle::TokenFilter { public: - virtual ~StringReverser() = default; - virtual void handleToken(QPDFTokenizer::Token const&); + ~StringReverser() override = default; + void handleToken(QPDFTokenizer::Token const&) override; }; void @@ -66,9 +66,9 @@ StringReverser::handleToken(QPDFTokenizer::Token const& token) class ColorToGray: public QPDFObjectHandle::TokenFilter { public: - virtual ~ColorToGray() = default; - virtual void handleToken(QPDFTokenizer::Token const&); - virtual void handleEOF(); + ~ColorToGray() override = default; + void handleToken(QPDFTokenizer::Token const&) override; + void handleEOF() override; private: bool isNumeric(QPDFTokenizer::token_type_e); diff --git a/examples/pdf-invert-images.cc b/examples/pdf-invert-images.cc index d714148c..fae305b1 100644 --- a/examples/pdf-invert-images.cc +++ b/examples/pdf-invert-images.cc @@ -33,7 +33,7 @@ usage() class ImageInverter: public QPDFObjectHandle::StreamDataProvider { public: - virtual ~ImageInverter() = default; + ~ImageInverter() override = default; void provideStreamData(QPDFObjGen const& og, Pipeline* pipeline) override; diff --git a/examples/pdf-parse-content.cc b/examples/pdf-parse-content.cc index 49440418..968c980b 100644 --- a/examples/pdf-parse-content.cc +++ b/examples/pdf-parse-content.cc @@ -22,10 +22,10 @@ usage() class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks { public: - virtual ~ParserCallbacks() = default; - virtual void contentSize(size_t); - virtual void handleObject(QPDFObjectHandle, size_t offset, size_t length); - virtual void handleEOF(); + ~ParserCallbacks() override = default; + void contentSize(size_t) override; + void handleObject(QPDFObjectHandle, size_t offset, size_t length) override; + void handleEOF() override; }; void diff --git a/fuzz/qpdf_fuzzer.cc b/fuzz/qpdf_fuzzer.cc index c402a772..8d4534bd 100644 --- a/fuzz/qpdf_fuzzer.cc +++ b/fuzz/qpdf_fuzzer.cc @@ -14,13 +14,13 @@ class DiscardContents: public QPDFObjectHandle::ParserCallbacks { public: - virtual ~DiscardContents() = default; - virtual void - handleObject(QPDFObjectHandle) + ~DiscardContents() override = default; + void + handleObject(QPDFObjectHandle) override { } - virtual void - handleEOF() + void + handleEOF() override { } }; diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index 34333e93..3ff714ae 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -369,8 +369,8 @@ class JSON JSON_value(vt_dictionary) { } - virtual ~JSON_dictionary() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_dictionary() override = default; + void write(Pipeline*, size_t depth) const override; std::map members; std::set parsed_keys; }; @@ -380,15 +380,15 @@ class JSON JSON_value(vt_array) { } - virtual ~JSON_array() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_array() override = default; + void write(Pipeline*, size_t depth) const override; std::vector elements; }; struct JSON_string: public JSON_value { JSON_string(std::string const& utf8); - virtual ~JSON_string() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_string() override = default; + void write(Pipeline*, size_t depth) const override; std::string utf8; std::string encoded; }; @@ -397,15 +397,15 @@ class JSON JSON_number(long long val); JSON_number(double val); JSON_number(std::string const& val); - virtual ~JSON_number() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_number() override = default; + void write(Pipeline*, size_t depth) const override; std::string encoded; }; struct JSON_bool: public JSON_value { JSON_bool(bool val); - virtual ~JSON_bool() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_bool() override = default; + void write(Pipeline*, size_t depth) const override; bool value; }; struct JSON_null: public JSON_value @@ -414,14 +414,14 @@ class JSON JSON_value(vt_null) { } - virtual ~JSON_null() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_null() override = default; + void write(Pipeline*, size_t depth) const override; }; struct JSON_blob: public JSON_value { JSON_blob(std::function fn); - virtual ~JSON_blob() = default; - virtual void write(Pipeline*, size_t depth) const; + ~JSON_blob() override = default; + void write(Pipeline*, size_t depth) const override; std::function fn; }; diff --git a/include/qpdf/Pl_Buffer.hh b/include/qpdf/Pl_Buffer.hh index fcef0c56..ffc01d95 100644 --- a/include/qpdf/Pl_Buffer.hh +++ b/include/qpdf/Pl_Buffer.hh @@ -45,11 +45,11 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline QPDF_DLL Pl_Buffer(char const* identifier, Pipeline* next = nullptr); QPDF_DLL - virtual ~Pl_Buffer(); + ~Pl_Buffer() override; QPDF_DLL - virtual void write(unsigned char const*, size_t); + void write(unsigned char const*, size_t) override; QPDF_DLL - virtual void finish(); + void finish() override; // Each call to getBuffer() resets this object -- see notes above. // The caller is responsible for deleting the returned Buffer diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index dcfd5f46..09221394 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -60,7 +60,7 @@ namespace class InvalidInputSource: public InputSource { public: - virtual ~InvalidInputSource() = default; + ~InvalidInputSource() override = default; qpdf_offset_t findAndSkipNextEOL() override { diff --git a/libqpdf/QPDFFormFieldObjectHelper.cc b/libqpdf/QPDFFormFieldObjectHelper.cc index 7712cab2..4b95c91f 100644 --- a/libqpdf/QPDFFormFieldObjectHelper.cc +++ b/libqpdf/QPDFFormFieldObjectHelper.cc @@ -515,9 +515,9 @@ namespace std::vector const& opt, double tf, QPDFObjectHandle::Rectangle const& bbox); - virtual ~ValueSetter() = default; - virtual void handleToken(QPDFTokenizer::Token const&); - virtual void handleEOF(); + ~ValueSetter() override = default; + void handleToken(QPDFTokenizer::Token const&) override; + void handleEOF() override; void writeAppearance(); private: @@ -706,10 +706,10 @@ namespace { public: TfFinder(); - virtual ~TfFinder() + ~TfFinder() override { } - virtual void handleToken(QPDFTokenizer::Token const&); + void handleToken(QPDFTokenizer::Token const&) override; double getTf(); std::string getFontName(); std::string getDA(); diff --git a/libqpdf/QPDFJob.cc b/libqpdf/QPDFJob.cc index 14583104..0e5ad3ae 100644 --- a/libqpdf/QPDFJob.cc +++ b/libqpdf/QPDFJob.cc @@ -48,8 +48,8 @@ namespace size_t oi_min_height, size_t oi_min_area, QPDFObjectHandle& image); - virtual ~ImageOptimizer() = default; - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); + ~ImageOptimizer() override = default; + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override; std::shared_ptr makePipeline(std::string const& description, Pipeline* next); bool evaluate(std::string const& description); @@ -65,13 +65,13 @@ namespace class DiscardContents: public QPDFObjectHandle::ParserCallbacks { public: - virtual ~DiscardContents() = default; - virtual void - handleObject(QPDFObjectHandle) + ~DiscardContents() override = default; + void + handleObject(QPDFObjectHandle) override { } - virtual void - handleEOF() + void + handleEOF() override { } }; @@ -98,8 +98,8 @@ namespace filename(filename) { } - virtual ~ProgressReporter() = default; - virtual void reportProgress(int); + ~ProgressReporter() override = default; + void reportProgress(int) override; private: Pipeline& p; diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc index 8b30f95b..93d269d3 100644 --- a/libqpdf/QPDFObjectHandle.cc +++ b/libqpdf/QPDFObjectHandle.cc @@ -111,8 +111,8 @@ namespace old_contents(old_contents) { } - virtual ~CoalesceProvider() = default; - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); + ~CoalesceProvider() override = default; + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override; private: QPDFObjectHandle containing_page; @@ -200,9 +200,9 @@ namespace { public: LastChar(Pipeline* next); - virtual ~LastChar() = default; - virtual void write(unsigned char const* data, size_t len); - virtual void finish(); + ~LastChar() override = default; + void write(unsigned char const* data, size_t len) override; + void finish() override; unsigned char getLastChar(); private: diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc index d83080b2..1a14e3a9 100644 --- a/libqpdf/QPDFTokenizer.cc +++ b/libqpdf/QPDFTokenizer.cc @@ -35,8 +35,8 @@ namespace str(str) { } - virtual ~QPDFWordTokenFinder() = default; - virtual bool check(); + ~QPDFWordTokenFinder() override = default; + bool check() override; private: std::shared_ptr is; diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc index 4ceeab48..9cfb3ac4 100644 --- a/libqpdf/QPDF_Stream.cc +++ b/libqpdf/QPDF_Stream.cc @@ -27,10 +27,10 @@ namespace { public: SF_Crypt() = default; - virtual ~SF_Crypt() = default; + ~SF_Crypt() override = default; - virtual bool - setDecodeParms(QPDFObjectHandle decode_parms) + bool + setDecodeParms(QPDFObjectHandle decode_parms) override { if (decode_parms.isNull()) { return true; @@ -49,8 +49,8 @@ namespace return filterable; } - virtual Pipeline* - getDecodePipeline(Pipeline*) + Pipeline* + getDecodePipeline(Pipeline*) override { // Not used -- handled by pipeStreamData return nullptr; diff --git a/libqpdf/qpdf/ContentNormalizer.hh b/libqpdf/qpdf/ContentNormalizer.hh index ba1063e0..d423aa4c 100644 --- a/libqpdf/qpdf/ContentNormalizer.hh +++ b/libqpdf/qpdf/ContentNormalizer.hh @@ -7,8 +7,8 @@ class ContentNormalizer: public QPDFObjectHandle::TokenFilter { public: ContentNormalizer(); - virtual ~ContentNormalizer() = default; - virtual void handleToken(QPDFTokenizer::Token const&); + ~ContentNormalizer() override = default; + void handleToken(QPDFTokenizer::Token const&) override; bool anyBadTokens() const; bool lastTokenWasBad() const; diff --git a/libqpdf/qpdf/CryptoRandomDataProvider.hh b/libqpdf/qpdf/CryptoRandomDataProvider.hh index 89859e65..e402d944 100644 --- a/libqpdf/qpdf/CryptoRandomDataProvider.hh +++ b/libqpdf/qpdf/CryptoRandomDataProvider.hh @@ -7,8 +7,8 @@ class CryptoRandomDataProvider: public RandomDataProvider { public: CryptoRandomDataProvider() = default; - virtual ~CryptoRandomDataProvider() = default; - virtual void provideRandomData(unsigned char* data, size_t len); + ~CryptoRandomDataProvider() override = default; + void provideRandomData(unsigned char* data, size_t len) override; static RandomDataProvider* getInstance(); }; diff --git a/libqpdf/qpdf/InsecureRandomDataProvider.hh b/libqpdf/qpdf/InsecureRandomDataProvider.hh index 47a81afe..bab4e002 100644 --- a/libqpdf/qpdf/InsecureRandomDataProvider.hh +++ b/libqpdf/qpdf/InsecureRandomDataProvider.hh @@ -7,8 +7,8 @@ class InsecureRandomDataProvider: public RandomDataProvider { public: InsecureRandomDataProvider(); - virtual ~InsecureRandomDataProvider() = default; - virtual void provideRandomData(unsigned char* data, size_t len); + ~InsecureRandomDataProvider() override = default; + void provideRandomData(unsigned char* data, size_t len) override; static RandomDataProvider* getInstance(); private: diff --git a/libqpdf/qpdf/OffsetInputSource.hh b/libqpdf/qpdf/OffsetInputSource.hh index d8b08145..fdc1a404 100644 --- a/libqpdf/qpdf/OffsetInputSource.hh +++ b/libqpdf/qpdf/OffsetInputSource.hh @@ -11,15 +11,15 @@ class OffsetInputSource: public InputSource public: OffsetInputSource( std::shared_ptr, qpdf_offset_t global_offset); - virtual ~OffsetInputSource() = default; + ~OffsetInputSource() override = default; - virtual qpdf_offset_t findAndSkipNextEOL(); - virtual std::string const& getName() const; - virtual qpdf_offset_t tell(); - virtual void seek(qpdf_offset_t offset, int whence); - virtual void rewind(); - virtual size_t read(char* buffer, size_t length); - virtual void unreadCh(char ch); + qpdf_offset_t findAndSkipNextEOL() override; + std::string const& getName() const override; + qpdf_offset_t tell() override; + void seek(qpdf_offset_t offset, int whence) override; + void rewind() override; + size_t read(char* buffer, size_t length) override; + void unreadCh(char ch) override; private: std::shared_ptr proxied; diff --git a/libqpdf/qpdf/Pl_AES_PDF.hh b/libqpdf/qpdf/Pl_AES_PDF.hh index 18091583..b3fde312 100644 --- a/libqpdf/qpdf/Pl_AES_PDF.hh +++ b/libqpdf/qpdf/Pl_AES_PDF.hh @@ -18,10 +18,10 @@ class Pl_AES_PDF: public Pipeline bool encrypt, unsigned char const* key, size_t key_bytes); - virtual ~Pl_AES_PDF() = default; + ~Pl_AES_PDF() override = default; - virtual void write(unsigned char const* data, size_t len); - virtual void finish(); + void write(unsigned char const* data, size_t len) override; + void finish() override; // Use zero initialization vector; needed for AESV3 void useZeroIV(); diff --git a/libqpdf/qpdf/Pl_ASCII85Decoder.hh b/libqpdf/qpdf/Pl_ASCII85Decoder.hh index 667b56e9..dd5efd06 100644 --- a/libqpdf/qpdf/Pl_ASCII85Decoder.hh +++ b/libqpdf/qpdf/Pl_ASCII85Decoder.hh @@ -7,9 +7,9 @@ class Pl_ASCII85Decoder: public Pipeline { public: Pl_ASCII85Decoder(char const* identifier, Pipeline* next); - virtual ~Pl_ASCII85Decoder() = default; - virtual void write(unsigned char const* buf, size_t len); - virtual void finish(); + ~Pl_ASCII85Decoder() override = default; + void write(unsigned char const* buf, size_t len) override; + void finish() override; private: void flush(); diff --git a/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh b/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh index c71dcf00..5edf74f0 100644 --- a/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh +++ b/libqpdf/qpdf/Pl_ASCIIHexDecoder.hh @@ -7,9 +7,9 @@ class Pl_ASCIIHexDecoder: public Pipeline { public: Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next); - virtual ~Pl_ASCIIHexDecoder() = default; - virtual void write(unsigned char const* buf, size_t len); - virtual void finish(); + ~Pl_ASCIIHexDecoder() override = default; + void write(unsigned char const* buf, size_t len) override; + void finish() override; private: void flush(); diff --git a/libqpdf/qpdf/Pl_Base64.hh b/libqpdf/qpdf/Pl_Base64.hh index 0e490cfe..a084a17f 100644 --- a/libqpdf/qpdf/Pl_Base64.hh +++ b/libqpdf/qpdf/Pl_Base64.hh @@ -8,7 +8,7 @@ class Pl_Base64: public Pipeline public: enum action_e { a_encode, a_decode }; Pl_Base64(char const* identifier, Pipeline* next, action_e); - virtual ~Pl_Base64() = default; + ~Pl_Base64() override = default; void write(unsigned char const* buf, size_t len) override; void finish() override; diff --git a/libqpdf/qpdf/Pl_PNGFilter.hh b/libqpdf/qpdf/Pl_PNGFilter.hh index 6cc34a9c..7ab7bf0d 100644 --- a/libqpdf/qpdf/Pl_PNGFilter.hh +++ b/libqpdf/qpdf/Pl_PNGFilter.hh @@ -22,10 +22,10 @@ class Pl_PNGFilter: public Pipeline unsigned int columns, unsigned int samples_per_pixel = 1, unsigned int bits_per_sample = 8); - virtual ~Pl_PNGFilter() = default; + ~Pl_PNGFilter() override = default; - virtual void write(unsigned char const* data, size_t len); - virtual void finish(); + void write(unsigned char const* data, size_t len) override; + void finish() override; private: void decodeSub(); diff --git a/libqpdf/qpdf/Pl_RC4.hh b/libqpdf/qpdf/Pl_RC4.hh index 07b8a1c4..49c943b9 100644 --- a/libqpdf/qpdf/Pl_RC4.hh +++ b/libqpdf/qpdf/Pl_RC4.hh @@ -17,10 +17,10 @@ class Pl_RC4: public Pipeline unsigned char const* key_data, int key_len = -1, size_t out_bufsize = def_bufsize); - virtual ~Pl_RC4() = default; + ~Pl_RC4() override = default; - virtual void write(unsigned char const* data, size_t len); - virtual void finish(); + void write(unsigned char const* data, size_t len) override; + void finish() override; private: std::shared_ptr outbuf; diff --git a/libqpdf/qpdf/Pl_SHA2.hh b/libqpdf/qpdf/Pl_SHA2.hh index 99a19a37..571271eb 100644 --- a/libqpdf/qpdf/Pl_SHA2.hh +++ b/libqpdf/qpdf/Pl_SHA2.hh @@ -21,9 +21,9 @@ class Pl_SHA2: public Pipeline { public: Pl_SHA2(int bits = 0, Pipeline* next = nullptr); - virtual ~Pl_SHA2() = default; - virtual void write(unsigned char const*, size_t); - virtual void finish(); + ~Pl_SHA2() override = default; + void write(unsigned char const*, size_t) override; + void finish() override; void resetBits(int bits); std::string getHexDigest(); std::string getRawDigest(); diff --git a/libqpdf/qpdf/Pl_TIFFPredictor.hh b/libqpdf/qpdf/Pl_TIFFPredictor.hh index 2b3bdb10..6bc48e72 100644 --- a/libqpdf/qpdf/Pl_TIFFPredictor.hh +++ b/libqpdf/qpdf/Pl_TIFFPredictor.hh @@ -18,10 +18,10 @@ class Pl_TIFFPredictor: public Pipeline unsigned int columns, unsigned int samples_per_pixel = 1, unsigned int bits_per_sample = 8); - virtual ~Pl_TIFFPredictor() = default; + ~Pl_TIFFPredictor() override = default; - virtual void write(unsigned char const* data, size_t len); - virtual void finish(); + void write(unsigned char const* data, size_t len) override; + void finish() override; private: void processRow(); diff --git a/libtests/dct_compress.cc b/libtests/dct_compress.cc index 2f12aea7..1f969982 100644 --- a/libtests/dct_compress.cc +++ b/libtests/dct_compress.cc @@ -22,8 +22,8 @@ class Callback: public Pl_DCT::CompressConfig called(false) { } - virtual ~Callback() = default; - virtual void apply(jpeg_compress_struct*); + ~Callback() override = default; + void apply(jpeg_compress_struct*) override; bool called; }; diff --git a/libtests/input_source.cc b/libtests/input_source.cc index 83744250..9ab41b5d 100644 --- a/libtests/input_source.cc +++ b/libtests/input_source.cc @@ -24,8 +24,8 @@ class Finder: public InputSource::Finder after(after) { } - virtual ~Finder() = default; - virtual bool check(); + ~Finder() override = default; + bool check() override; private: std::shared_ptr is;