aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/qpdf/BufferInputSource.hh16
-rw-r--r--include/qpdf/ClosedFileInputSource.hh16
-rw-r--r--include/qpdf/FileInputSource.hh16
-rw-r--r--include/qpdf/Pl_Concatenate.hh6
-rw-r--r--include/qpdf/Pl_Count.hh6
-rw-r--r--include/qpdf/Pl_DCT.hh6
-rw-r--r--include/qpdf/Pl_Discard.hh6
-rw-r--r--include/qpdf/Pl_Flate.hh6
-rw-r--r--include/qpdf/Pl_Function.hh6
-rw-r--r--include/qpdf/Pl_OStream.hh6
-rw-r--r--include/qpdf/Pl_QPDFTokenizer.hh6
-rw-r--r--include/qpdf/Pl_RunLength.hh6
-rw-r--r--include/qpdf/Pl_StdioFile.hh6
-rw-r--r--include/qpdf/Pl_String.hh6
-rw-r--r--include/qpdf/QPDF.hh14
-rw-r--r--include/qpdf/QPDFAcroFormDocumentHelper.hh2
-rw-r--r--include/qpdf/QPDFAnnotationObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFEFStreamObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFEmbeddedFileDocumentHelper.hh2
-rw-r--r--include/qpdf/QPDFExc.hh2
-rw-r--r--include/qpdf/QPDFFileSpecObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFFormFieldObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFNameTreeObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFNumberTreeObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFOutlineDocumentHelper.hh2
-rw-r--r--include/qpdf/QPDFOutlineObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFPageDocumentHelper.hh2
-rw-r--r--include/qpdf/QPDFPageLabelDocumentHelper.hh2
-rw-r--r--include/qpdf/QPDFPageObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFSystemError.hh2
-rw-r--r--include/qpdf/QPDFUsage.hh2
-rw-r--r--include/qpdf/QPDFWriter.hh2
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc4
-rw-r--r--libqpdf/QPDFPageObjectHelper.cc8
-rw-r--r--libqpdf/QPDF_json.cc2
-rw-r--r--libqpdf/qpdf/Pl_LZWDecoder.hh6
-rw-r--r--libqpdf/qpdf/Pl_MD5.hh6
-rw-r--r--libqpdf/qpdf/QPDF_Array.hh10
-rw-r--r--libqpdf/qpdf/QPDF_Bool.hh8
-rw-r--r--libqpdf/qpdf/QPDF_Destroyed.hh8
-rw-r--r--libqpdf/qpdf/QPDF_Dictionary.hh10
-rw-r--r--libqpdf/qpdf/QPDF_InlineImage.hh12
-rw-r--r--libqpdf/qpdf/QPDF_Integer.hh8
-rw-r--r--libqpdf/qpdf/QPDF_Name.hh12
-rw-r--r--libqpdf/qpdf/QPDF_Null.hh8
-rw-r--r--libqpdf/qpdf/QPDF_Operator.hh12
-rw-r--r--libqpdf/qpdf/QPDF_Real.hh12
-rw-r--r--libqpdf/qpdf/QPDF_Reserved.hh8
-rw-r--r--libqpdf/qpdf/QPDF_Stream.hh14
-rw-r--r--libqpdf/qpdf/QPDF_String.hh12
-rw-r--r--libqpdf/qpdf/QPDF_Unresolved.hh8
-rw-r--r--libqpdf/qpdf/ResourceFinder.hh2
-rw-r--r--libqpdf/qpdf/SF_ASCII85Decode.hh2
-rw-r--r--libqpdf/qpdf/SF_ASCIIHexDecode.hh2
-rw-r--r--libqpdf/qpdf/SF_DCTDecode.hh2
-rw-r--r--libqpdf/qpdf/SF_FlateLzwDecode.hh6
-rw-r--r--libqpdf/qpdf/SF_RunLengthDecode.hh2
-rw-r--r--libqpdf/qpdf/SecureRandomDataProvider.hh4
-rw-r--r--libtests/json_parse.cc2
-rw-r--r--libtests/random.cc6
-rw-r--r--qpdf/test_driver.cc26
-rw-r--r--qpdf/test_large_file.cc10
-rw-r--r--qpdf/test_tokenizer.cc4
63 files changed, 199 insertions, 199 deletions
diff --git a/include/qpdf/BufferInputSource.hh b/include/qpdf/BufferInputSource.hh
index 2ef04a28..bd63f788 100644
--- a/include/qpdf/BufferInputSource.hh
+++ b/include/qpdf/BufferInputSource.hh
@@ -32,21 +32,21 @@ class QPDF_DLL_CLASS BufferInputSource: public InputSource
QPDF_DLL
BufferInputSource(std::string const& description, std::string const& contents);
QPDF_DLL
- virtual ~BufferInputSource();
+ ~BufferInputSource() override;
QPDF_DLL
- virtual qpdf_offset_t findAndSkipNextEOL();
+ qpdf_offset_t findAndSkipNextEOL() override;
QPDF_DLL
- virtual std::string const& getName() const;
+ std::string const& getName() const override;
QPDF_DLL
- virtual qpdf_offset_t tell();
+ qpdf_offset_t tell() override;
QPDF_DLL
- virtual void seek(qpdf_offset_t offset, int whence);
+ void seek(qpdf_offset_t offset, int whence) override;
QPDF_DLL
- virtual void rewind();
+ void rewind() override;
QPDF_DLL
- virtual size_t read(char* buffer, size_t length);
+ size_t read(char* buffer, size_t length) override;
QPDF_DLL
- virtual void unreadCh(char ch);
+ void unreadCh(char ch) override;
private:
bool own_memory;
diff --git a/include/qpdf/ClosedFileInputSource.hh b/include/qpdf/ClosedFileInputSource.hh
index 41c46242..1a6a9a0b 100644
--- a/include/qpdf/ClosedFileInputSource.hh
+++ b/include/qpdf/ClosedFileInputSource.hh
@@ -37,21 +37,21 @@ class QPDF_DLL_CLASS ClosedFileInputSource: public InputSource
QPDF_DLL
ClosedFileInputSource(char const* filename);
QPDF_DLL
- virtual ~ClosedFileInputSource();
+ ~ClosedFileInputSource() override;
QPDF_DLL
- virtual qpdf_offset_t findAndSkipNextEOL();
+ qpdf_offset_t findAndSkipNextEOL() override;
QPDF_DLL
- virtual std::string const& getName() const;
+ std::string const& getName() const override;
QPDF_DLL
- virtual qpdf_offset_t tell();
+ qpdf_offset_t tell() override;
QPDF_DLL
- virtual void seek(qpdf_offset_t offset, int whence);
+ void seek(qpdf_offset_t offset, int whence) override;
QPDF_DLL
- virtual void rewind();
+ void rewind() override;
QPDF_DLL
- virtual size_t read(char* buffer, size_t length);
+ size_t read(char* buffer, size_t length) override;
QPDF_DLL
- virtual void unreadCh(char ch);
+ void unreadCh(char ch) override;
// The file stays open between calls to stayOpen(true) and stayOpen(false). You can use this to
// surround multiple operations on a single ClosedFileInputSource to reduce the overhead of a
diff --git a/include/qpdf/FileInputSource.hh b/include/qpdf/FileInputSource.hh
index 71adad7b..ed9ae6c6 100644
--- a/include/qpdf/FileInputSource.hh
+++ b/include/qpdf/FileInputSource.hh
@@ -35,21 +35,21 @@ class QPDF_DLL_CLASS FileInputSource: public InputSource
QPDF_DLL
void setFile(char const* description, FILE* filep, bool close_file);
QPDF_DLL
- virtual ~FileInputSource();
+ ~FileInputSource() override;
QPDF_DLL
- virtual qpdf_offset_t findAndSkipNextEOL();
+ qpdf_offset_t findAndSkipNextEOL() override;
QPDF_DLL
- virtual std::string const& getName() const;
+ std::string const& getName() const override;
QPDF_DLL
- virtual qpdf_offset_t tell();
+ qpdf_offset_t tell() override;
QPDF_DLL
- virtual void seek(qpdf_offset_t offset, int whence);
+ void seek(qpdf_offset_t offset, int whence) override;
QPDF_DLL
- virtual void rewind();
+ void rewind() override;
QPDF_DLL
- virtual size_t read(char* buffer, size_t length);
+ size_t read(char* buffer, size_t length) override;
QPDF_DLL
- virtual void unreadCh(char ch);
+ void unreadCh(char ch) override;
private:
FileInputSource(FileInputSource const&) = delete;
diff --git a/include/qpdf/Pl_Concatenate.hh b/include/qpdf/Pl_Concatenate.hh
index 24977de1..bee1bcf3 100644
--- a/include/qpdf/Pl_Concatenate.hh
+++ b/include/qpdf/Pl_Concatenate.hh
@@ -32,13 +32,13 @@ class QPDF_DLL_CLASS Pl_Concatenate: public Pipeline
QPDF_DLL
Pl_Concatenate(char const* identifier, Pipeline* next);
QPDF_DLL
- virtual ~Pl_Concatenate();
+ ~Pl_Concatenate() override;
QPDF_DLL
- virtual void write(unsigned char const* data, size_t len);
+ void write(unsigned char const* data, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
// At the very end, call manualFinish to actually finish the rest of the pipeline.
QPDF_DLL
diff --git a/include/qpdf/Pl_Count.hh b/include/qpdf/Pl_Count.hh
index 51338607..3601f8de 100644
--- a/include/qpdf/Pl_Count.hh
+++ b/include/qpdf/Pl_Count.hh
@@ -30,11 +30,11 @@ class QPDF_DLL_CLASS Pl_Count: public Pipeline
QPDF_DLL
Pl_Count(char const* identifier, Pipeline* next);
QPDF_DLL
- virtual ~Pl_Count();
+ ~Pl_Count() 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;
// Returns the number of bytes written
QPDF_DLL
qpdf_offset_t getCount() const;
diff --git a/include/qpdf/Pl_DCT.hh b/include/qpdf/Pl_DCT.hh
index e4f6345f..b7e6b1e3 100644
--- a/include/qpdf/Pl_DCT.hh
+++ b/include/qpdf/Pl_DCT.hh
@@ -56,12 +56,12 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline
CompressConfig* config_callback = nullptr);
QPDF_DLL
- virtual ~Pl_DCT();
+ ~Pl_DCT() override;
QPDF_DLL
- virtual void write(unsigned char const* data, size_t len);
+ void write(unsigned char const* data, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
QPDF_DLL_PRIVATE
diff --git a/include/qpdf/Pl_Discard.hh b/include/qpdf/Pl_Discard.hh
index b2733a66..2eddf13d 100644
--- a/include/qpdf/Pl_Discard.hh
+++ b/include/qpdf/Pl_Discard.hh
@@ -31,11 +31,11 @@ class QPDF_DLL_CLASS Pl_Discard: public Pipeline
QPDF_DLL
Pl_Discard();
QPDF_DLL
- virtual ~Pl_Discard();
+ ~Pl_Discard() 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;
private:
class QPDF_DLL_PRIVATE Members
diff --git a/include/qpdf/Pl_Flate.hh b/include/qpdf/Pl_Flate.hh
index c31d4a0b..14009b2a 100644
--- a/include/qpdf/Pl_Flate.hh
+++ b/include/qpdf/Pl_Flate.hh
@@ -40,12 +40,12 @@ class QPDF_DLL_CLASS Pl_Flate: public Pipeline
action_e action,
unsigned int out_bufsize = def_bufsize);
QPDF_DLL
- virtual ~Pl_Flate();
+ ~Pl_Flate() override;
QPDF_DLL
- virtual void write(unsigned char const* data, size_t len);
+ void write(unsigned char const* data, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
// Globally set compression level from 1 (fastest, least
// compression) to 9 (slowest, most compression). Use -1 to set
diff --git a/include/qpdf/Pl_Function.hh b/include/qpdf/Pl_Function.hh
index c9d5550d..afd421a3 100644
--- a/include/qpdf/Pl_Function.hh
+++ b/include/qpdf/Pl_Function.hh
@@ -54,12 +54,12 @@ class QPDF_DLL_CLASS Pl_Function: public Pipeline
Pl_Function(char const* identifier, Pipeline* next, writer_c_char_t fn, void* udata);
QPDF_DLL
- virtual ~Pl_Function();
+ ~Pl_Function() override;
QPDF_DLL
- virtual void write(unsigned char const* buf, size_t len);
+ void write(unsigned char const* buf, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
class QPDF_DLL_PRIVATE Members
diff --git a/include/qpdf/Pl_OStream.hh b/include/qpdf/Pl_OStream.hh
index 3ea21c93..9aeaac4d 100644
--- a/include/qpdf/Pl_OStream.hh
+++ b/include/qpdf/Pl_OStream.hh
@@ -36,12 +36,12 @@ class QPDF_DLL_CLASS Pl_OStream: public Pipeline
QPDF_DLL
Pl_OStream(char const* identifier, std::ostream& os);
QPDF_DLL
- virtual ~Pl_OStream();
+ ~Pl_OStream() override;
QPDF_DLL
- virtual void write(unsigned char const* buf, size_t len);
+ void write(unsigned char const* buf, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
class QPDF_DLL_PRIVATE Members
diff --git a/include/qpdf/Pl_QPDFTokenizer.hh b/include/qpdf/Pl_QPDFTokenizer.hh
index 5bc6cb87..79cbda7b 100644
--- a/include/qpdf/Pl_QPDFTokenizer.hh
+++ b/include/qpdf/Pl_QPDFTokenizer.hh
@@ -45,11 +45,11 @@ class QPDF_DLL_CLASS Pl_QPDFTokenizer: public Pipeline
Pl_QPDFTokenizer(
char const* identifier, QPDFObjectHandle::TokenFilter* filter, Pipeline* next = nullptr);
QPDF_DLL
- virtual ~Pl_QPDFTokenizer();
+ ~Pl_QPDFTokenizer() override;
QPDF_DLL
- virtual void write(unsigned char const* buf, size_t len);
+ void write(unsigned char const* buf, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
class QPDF_DLL_PRIVATE Members
diff --git a/include/qpdf/Pl_RunLength.hh b/include/qpdf/Pl_RunLength.hh
index 86782535..e04bce2d 100644
--- a/include/qpdf/Pl_RunLength.hh
+++ b/include/qpdf/Pl_RunLength.hh
@@ -29,12 +29,12 @@ class QPDF_DLL_CLASS Pl_RunLength: public Pipeline
QPDF_DLL
Pl_RunLength(char const* identifier, Pipeline* next, action_e action);
QPDF_DLL
- virtual ~Pl_RunLength();
+ ~Pl_RunLength() override;
QPDF_DLL
- virtual void write(unsigned char const* data, size_t len);
+ void write(unsigned char const* data, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
QPDF_DLL_PRIVATE
diff --git a/include/qpdf/Pl_StdioFile.hh b/include/qpdf/Pl_StdioFile.hh
index 90190d2b..fb994459 100644
--- a/include/qpdf/Pl_StdioFile.hh
+++ b/include/qpdf/Pl_StdioFile.hh
@@ -36,12 +36,12 @@ class QPDF_DLL_CLASS Pl_StdioFile: public Pipeline
QPDF_DLL
Pl_StdioFile(char const* identifier, FILE* f);
QPDF_DLL
- virtual ~Pl_StdioFile();
+ ~Pl_StdioFile() override;
QPDF_DLL
- virtual void write(unsigned char const* buf, size_t len);
+ void write(unsigned char const* buf, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
class QPDF_DLL_PRIVATE Members
diff --git a/include/qpdf/Pl_String.hh b/include/qpdf/Pl_String.hh
index 8f712fbf..dc720c90 100644
--- a/include/qpdf/Pl_String.hh
+++ b/include/qpdf/Pl_String.hh
@@ -41,12 +41,12 @@ class QPDF_DLL_CLASS Pl_String: public Pipeline
QPDF_DLL
Pl_String(char const* identifier, Pipeline* next, std::string& s);
QPDF_DLL
- virtual ~Pl_String();
+ ~Pl_String() override;
QPDF_DLL
- virtual void write(unsigned char const* buf, size_t len);
+ void write(unsigned char const* buf, size_t len) override;
QPDF_DLL
- virtual void finish();
+ void finish() override;
private:
class QPDF_DLL_PRIVATE Members
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index ee0a7b79..e54947d9 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -942,8 +942,8 @@ class QPDF
{
public:
CopiedStreamDataProvider(QPDF& destination_qpdf);
- virtual ~CopiedStreamDataProvider() = default;
- virtual bool provideStreamData(
+ ~CopiedStreamDataProvider() override = default;
+ bool provideStreamData(
QPDFObjGen const& og,
Pipeline* pipeline,
bool suppress_warnings,
@@ -963,8 +963,8 @@ class QPDF
public:
StringDecrypter(QPDF* qpdf, QPDFObjGen const& og);
- virtual ~StringDecrypter() = default;
- virtual void decryptString(std::string& val);
+ ~StringDecrypter() override = default;
+ void decryptString(std::string& val) override;
private:
QPDF* qpdf;
@@ -1308,9 +1308,9 @@ class QPDF
checker(checker)
{
}
- virtual ~PatternFinder() = default;
- virtual bool
- check()
+ ~PatternFinder() override = default;
+ bool
+ check() override
{
return (this->qpdf.*checker)();
}
diff --git a/include/qpdf/QPDFAcroFormDocumentHelper.hh b/include/qpdf/QPDFAcroFormDocumentHelper.hh
index a86563fa..8be4d069 100644
--- a/include/qpdf/QPDFAcroFormDocumentHelper.hh
+++ b/include/qpdf/QPDFAcroFormDocumentHelper.hh
@@ -71,7 +71,7 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper
QPDF_DLL
QPDFAcroFormDocumentHelper(QPDF&);
QPDF_DLL
- virtual ~QPDFAcroFormDocumentHelper() = default;
+ ~QPDFAcroFormDocumentHelper() override = default;
// This class lazily creates an internal cache of the mapping among form fields, annotations,
// and pages. Methods within this class preserve the validity of this cache. However, if you
diff --git a/include/qpdf/QPDFAnnotationObjectHelper.hh b/include/qpdf/QPDFAnnotationObjectHelper.hh
index b93f895f..69ec77b4 100644
--- a/include/qpdf/QPDFAnnotationObjectHelper.hh
+++ b/include/qpdf/QPDFAnnotationObjectHelper.hh
@@ -30,7 +30,7 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper
QPDF_DLL
QPDFAnnotationObjectHelper(QPDFObjectHandle);
QPDF_DLL
- virtual ~QPDFAnnotationObjectHelper() = default;
+ ~QPDFAnnotationObjectHelper() override = default;
// This class provides helper methods for annotations. More functionality will likely be added
// in the future.
diff --git a/include/qpdf/QPDFEFStreamObjectHelper.hh b/include/qpdf/QPDFEFStreamObjectHelper.hh
index cdb5c278..2d55cca7 100644
--- a/include/qpdf/QPDFEFStreamObjectHelper.hh
+++ b/include/qpdf/QPDFEFStreamObjectHelper.hh
@@ -35,7 +35,7 @@ class QPDFEFStreamObjectHelper: public QPDFObjectHelper
QPDF_DLL
QPDFEFStreamObjectHelper(QPDFObjectHandle);
QPDF_DLL
- virtual ~QPDFEFStreamObjectHelper() = default;
+ ~QPDFEFStreamObjectHelper() override = default;
// Date parameters are strings that conform to the PDF spec for date/time strings, which is
// "D:yyyymmddhhmmss<z>" where <z> is either "Z" for UTC or "-hh'mm'" or "+hh'mm'" for timezone
diff --git a/include/qpdf/QPDFEmbeddedFileDocumentHelper.hh b/include/qpdf/QPDFEmbeddedFileDocumentHelper.hh
index 4727feef..b4633369 100644
--- a/include/qpdf/QPDFEmbeddedFileDocumentHelper.hh
+++ b/include/qpdf/QPDFEmbeddedFileDocumentHelper.hh
@@ -39,7 +39,7 @@ class QPDFEmbeddedFileDocumentHelper: public QPDFDocumentHelper
QPDF_DLL
QPDFEmbeddedFileDocumentHelper(QPDF&);
QPDF_DLL
- virtual ~QPDFEmbeddedFileDocumentHelper() = default;
+ ~QPDFEmbeddedFileDocumentHelper() override = default;
QPDF_DLL
bool hasEmbeddedFiles() const;
diff --git a/include/qpdf/QPDFExc.hh b/include/qpdf/QPDFExc.hh
index 1a9e16f2..daa52a47 100644
--- a/include/qpdf/QPDFExc.hh
+++ b/include/qpdf/QPDFExc.hh
@@ -37,7 +37,7 @@ class QPDF_DLL_CLASS QPDFExc: public std::runtime_error
qpdf_offset_t offset,
std::string const& message);
QPDF_DLL
- virtual ~QPDFExc() noexcept = default;
+ ~QPDFExc() noexcept override = default;
// To get a complete error string, call what(), provided by std::exception. The accessors below
// return the original values used to create the exception. Only the error code and message are
diff --git a/include/qpdf/QPDFFileSpecObjectHelper.hh b/include/qpdf/QPDFFileSpecObjectHelper.hh
index 9b6474df..6001f09d 100644
--- a/include/qpdf/QPDFFileSpecObjectHelper.hh
+++ b/include/qpdf/QPDFFileSpecObjectHelper.hh
@@ -35,7 +35,7 @@ class QPDFFileSpecObjectHelper: public QPDFObjectHelper
QPDF_DLL
QPDFFileSpecObjectHelper(QPDFObjectHandle);
QPDF_DLL
- virtual ~QPDFFileSpecObjectHelper() = default;
+ ~QPDFFileSpecObjectHelper() override = default;
QPDF_DLL
std::string getDescription();
diff --git a/include/qpdf/QPDFFormFieldObjectHelper.hh b/include/qpdf/QPDFFormFieldObjectHelper.hh
index fbd5547f..156ccc64 100644
--- a/include/qpdf/QPDFFormFieldObjectHelper.hh
+++ b/include/qpdf/QPDFFormFieldObjectHelper.hh
@@ -37,7 +37,7 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper
QPDF_DLL
QPDFFormFieldObjectHelper(QPDFObjectHandle);
QPDF_DLL
- virtual ~QPDFFormFieldObjectHelper() = default;
+ ~QPDFFormFieldObjectHelper() override = default;
QPDF_DLL
bool isNull();
diff --git a/include/qpdf/QPDFNameTreeObjectHelper.hh b/include/qpdf/QPDFNameTreeObjectHelper.hh
index 90cb6856..1d344a6c 100644
--- a/include/qpdf/QPDFNameTreeObjectHelper.hh
+++ b/include/qpdf/QPDFNameTreeObjectHelper.hh
@@ -50,7 +50,7 @@ class QPDF_DLL_CLASS QPDFNameTreeObjectHelper: public QPDFObjectHelper
static QPDFNameTreeObjectHelper newEmpty(QPDF&, bool auto_repair = true);
QPDF_DLL
- virtual ~QPDFNameTreeObjectHelper();
+ ~QPDFNameTreeObjectHelper() override;
// Return whether the name tree has an explicit entry for this name.
QPDF_DLL
diff --git a/include/qpdf/QPDFNumberTreeObjectHelper.hh b/include/qpdf/QPDFNumberTreeObjectHelper.hh
index 12603af0..fe55a28f 100644
--- a/include/qpdf/QPDFNumberTreeObjectHelper.hh
+++ b/include/qpdf/QPDFNumberTreeObjectHelper.hh
@@ -44,7 +44,7 @@ class QPDF_DLL_CLASS QPDFNumberTreeObjectHelper: public QPDFObjectHelper
QPDFNumberTreeObjectHelper(QPDFObjectHandle, QPDF&, bool auto_repair = true);
QPDF_DLL
- virtual ~QPDFNumberTreeObjectHelper();
+ ~QPDFNumberTreeObjectHelper() override;
// Create an empty number tree
QPDF_DLL
diff --git a/include/qpdf/QPDFOutlineDocumentHelper.hh b/include/qpdf/QPDFOutlineDocumentHelper.hh
index eb5f8f9a..1d249969 100644
--- a/include/qpdf/QPDFOutlineDocumentHelper.hh
+++ b/include/qpdf/QPDFOutlineDocumentHelper.hh
@@ -41,7 +41,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper
QPDF_DLL
QPDFOutlineDocumentHelper(QPDF&);
QPDF_DLL
- virtual ~QPDFOutlineDocumentHelper() = default;
+ ~QPDFOutlineDocumentHelper() override = default;
QPDF_DLL
bool hasOutlines();
diff --git a/include/qpdf/QPDFOutlineObjectHelper.hh b/include/qpdf/QPDFOutlineObjectHelper.hh
index d9868949..6b42f509 100644
--- a/include/qpdf/QPDFOutlineObjectHelper.hh
+++ b/include/qpdf/QPDFOutlineObjectHelper.hh
@@ -34,7 +34,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper
{
public:
QPDF_DLL
- virtual ~QPDFOutlineObjectHelper()
+ ~QPDFOutlineObjectHelper() override
{
// This must be cleared explicitly to avoid circular references that prevent cleanup of
// shared pointers.
diff --git a/include/qpdf/QPDFPageDocumentHelper.hh b/include/qpdf/QPDFPageDocumentHelper.hh
index a6005a45..b408fdd2 100644
--- a/include/qpdf/QPDFPageDocumentHelper.hh
+++ b/include/qpdf/QPDFPageDocumentHelper.hh
@@ -37,7 +37,7 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper
QPDF_DLL
QPDFPageDocumentHelper(QPDF&);
QPDF_DLL
- virtual ~QPDFPageDocumentHelper() = default;
+ ~QPDFPageDocumentHelper() override = default;
// Traverse page tree, and return all /Page objects wrapped in QPDFPageObjectHelper objects.
// Unlike with QPDF::getAllPages, the vector of pages returned by this call is not affected by
diff --git a/include/qpdf/QPDFPageLabelDocumentHelper.hh b/include/qpdf/QPDFPageLabelDocumentHelper.hh
index 64e85869..741329cb 100644
--- a/include/qpdf/QPDFPageLabelDocumentHelper.hh
+++ b/include/qpdf/QPDFPageLabelDocumentHelper.hh
@@ -44,7 +44,7 @@ class QPDFPageLabelDocumentHelper: public QPDFDocumentHelper
QPDF_DLL
QPDFPageLabelDocumentHelper(QPDF&);
QPDF_DLL
- virtual ~QPDFPageLabelDocumentHelper() = default;
+ ~QPDFPageLabelDocumentHelper() override = default;
QPDF_DLL
bool hasPageLabels();
diff --git a/include/qpdf/QPDFPageObjectHelper.hh b/include/qpdf/QPDFPageObjectHelper.hh
index 120df104..a5be1dee 100644
--- a/include/qpdf/QPDFPageObjectHelper.hh
+++ b/include/qpdf/QPDFPageObjectHelper.hh
@@ -39,7 +39,7 @@ class QPDFPageObjectHelper: public QPDFObjectHelper
QPDF_DLL
QPDFPageObjectHelper(QPDFObjectHandle);
QPDF_DLL
- virtual ~QPDFPageObjectHelper() = default;
+ ~QPDFPageObjectHelper() override = default;
// PAGE ATTRIBUTES
diff --git a/include/qpdf/QPDFSystemError.hh b/include/qpdf/QPDFSystemError.hh
index 7833b070..cdc3e386 100644
--- a/include/qpdf/QPDFSystemError.hh
+++ b/include/qpdf/QPDFSystemError.hh
@@ -32,7 +32,7 @@ class QPDF_DLL_CLASS QPDFSystemError: public std::runtime_error
QPDF_DLL
QPDFSystemError(std::string const& description, int system_errno);
QPDF_DLL
- virtual ~QPDFSystemError() noexcept = default;
+ ~QPDFSystemError() noexcept override = default;
// To get a complete error string, call what(), provided by std::exception. The accessors below
// return the original values used to create the exception.
diff --git a/include/qpdf/QPDFUsage.hh b/include/qpdf/QPDFUsage.hh
index 538392a0..16fbb867 100644
--- a/include/qpdf/QPDFUsage.hh
+++ b/include/qpdf/QPDFUsage.hh
@@ -30,7 +30,7 @@ class QPDF_DLL_CLASS QPDFUsage: public std::runtime_error
QPDF_DLL
QPDFUsage(std::string const& msg);
QPDF_DLL
- virtual ~QPDFUsage() noexcept = default;
+ ~QPDFUsage() noexcept override = default;
};
#endif // QPDFUSAGE_HH
diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh
index 34720119..be2d6f2e 100644
--- a/include/qpdf/QPDFWriter.hh
+++ b/include/qpdf/QPDFWriter.hh
@@ -92,7 +92,7 @@ class QPDFWriter
QPDF_DLL
FunctionProgressReporter(std::function<void(int)>);
QPDF_DLL
- virtual ~FunctionProgressReporter();
+ ~FunctionProgressReporter() override;
QPDF_DLL
void reportProgress(int) override;
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index 0d336b11..83feb358 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -469,8 +469,8 @@ namespace
ResourceReplacer(
std::map<std::string, std::map<std::string, std::string>> const& dr_map,
std::map<std::string, std::map<std::string, std::set<size_t>>> const& rnames);
- virtual ~ResourceReplacer() = default;
- virtual void handleToken(QPDFTokenizer::Token const&) override;
+ ~ResourceReplacer() override = default;
+ void handleToken(QPDFTokenizer::Token const&) override;
private:
size_t offset{0};
diff --git a/libqpdf/QPDFPageObjectHelper.cc b/libqpdf/QPDFPageObjectHelper.cc
index 1bbac2c4..fd6e5215 100644
--- a/libqpdf/QPDFPageObjectHelper.cc
+++ b/libqpdf/QPDFPageObjectHelper.cc
@@ -20,8 +20,8 @@ namespace
from_page(from_page)
{
}
- virtual ~ContentProvider() = default;
- virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline);
+ ~ContentProvider() override = default;
+ void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override;
private:
QPDFObjectHandle from_page;
@@ -44,8 +44,8 @@ namespace
{
public:
InlineImageTracker(QPDF*, size_t min_size, QPDFObjectHandle resources);
- virtual ~InlineImageTracker() = default;
- virtual void handleToken(QPDFTokenizer::Token const&);
+ ~InlineImageTracker() override = default;
+ void handleToken(QPDFTokenizer::Token const&) override;
QPDFObjectHandle convertIIDict(QPDFObjectHandle odict);
QPDF* qpdf;
diff --git a/libqpdf/QPDF_json.cc b/libqpdf/QPDF_json.cc
index c74cf4f7..f8fd689a 100644
--- a/libqpdf/QPDF_json.cc
+++ b/libqpdf/QPDF_json.cc
@@ -238,7 +238,7 @@ class QPDF::JSONReactor: public JSON::Reactor
}
}
}
- virtual ~JSONReactor() = default;
+ ~JSONReactor() override = default;
void dictionaryStart() override;
void arrayStart() override;
void containerEnd(JSON const& value) override;
diff --git a/libqpdf/qpdf/Pl_LZWDecoder.hh b/libqpdf/qpdf/Pl_LZWDecoder.hh
index b2135aa9..792fa8ef 100644
--- a/libqpdf/qpdf/Pl_LZWDecoder.hh
+++ b/libqpdf/qpdf/Pl_LZWDecoder.hh
@@ -10,9 +10,9 @@ class Pl_LZWDecoder: public Pipeline
{
public:
Pl_LZWDecoder(char const* identifier, Pipeline* next, bool early_code_change);
- virtual ~Pl_LZWDecoder() = default;
- virtual void write(unsigned char const* buf, size_t len);
- virtual void finish();
+ ~Pl_LZWDecoder() override = default;
+ void write(unsigned char const* buf, size_t len) override;
+ void finish() override;
private:
void sendNextCode();
diff --git a/libqpdf/qpdf/Pl_MD5.hh b/libqpdf/qpdf/Pl_MD5.hh
index 5763d6eb..fb9a2184 100644
--- a/libqpdf/qpdf/Pl_MD5.hh
+++ b/libqpdf/qpdf/Pl_MD5.hh
@@ -14,9 +14,9 @@ class Pl_MD5: public Pipeline
{
public:
Pl_MD5(char const* identifier, Pipeline* next);
- virtual ~Pl_MD5() = default;
- virtual void write(unsigned char const*, size_t);
- virtual void finish();
+ ~Pl_MD5() override = default;
+ void write(unsigned char const*, size_t) override;
+ void finish() override;
std::string getHexDigest();
// Enable/disable. Disabling the pipeline causes it to become a pass-through. This makes it
// possible to stick an MD5 pipeline in a pipeline when it may or may not be required. Disabling
diff --git a/libqpdf/qpdf/QPDF_Array.hh b/libqpdf/qpdf/QPDF_Array.hh
index 51a366a6..10ac9f8c 100644
--- a/libqpdf/qpdf/QPDF_Array.hh
+++ b/libqpdf/qpdf/QPDF_Array.hh
@@ -9,14 +9,14 @@
class QPDF_Array: public QPDFValue
{
public:
- virtual ~QPDF_Array() = default;
+ ~QPDF_Array() override = default;
static std::shared_ptr<QPDFObject> create(std::vector<QPDFObjectHandle> const& items);
static std::shared_ptr<QPDFObject>
create(std::vector<std::shared_ptr<QPDFObject>>&& items, bool sparse);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
- virtual void disconnect();
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
+ void disconnect() override;
int
size() const noexcept
diff --git a/libqpdf/qpdf/QPDF_Bool.hh b/libqpdf/qpdf/QPDF_Bool.hh
index 215d359a..0b4a71fd 100644
--- a/libqpdf/qpdf/QPDF_Bool.hh
+++ b/libqpdf/qpdf/QPDF_Bool.hh
@@ -6,11 +6,11 @@
class QPDF_Bool: public QPDFValue
{
public:
- virtual ~QPDF_Bool() = default;
+ ~QPDF_Bool() override = default;
static std::shared_ptr<QPDFObject> create(bool val);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
bool getVal() const;
private:
diff --git a/libqpdf/qpdf/QPDF_Destroyed.hh b/libqpdf/qpdf/QPDF_Destroyed.hh
index c8e35557..72e9130a 100644
--- a/libqpdf/qpdf/QPDF_Destroyed.hh
+++ b/libqpdf/qpdf/QPDF_Destroyed.hh
@@ -6,10 +6,10 @@
class QPDF_Destroyed: public QPDFValue
{
public:
- virtual ~QPDF_Destroyed() = default;
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ ~QPDF_Destroyed() override = default;
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
static std::shared_ptr<QPDFValue> getInstance();
private:
diff --git a/libqpdf/qpdf/QPDF_Dictionary.hh b/libqpdf/qpdf/QPDF_Dictionary.hh
index da38db7a..0fb6636e 100644
--- a/libqpdf/qpdf/QPDF_Dictionary.hh
+++ b/libqpdf/qpdf/QPDF_Dictionary.hh
@@ -11,13 +11,13 @@
class QPDF_Dictionary: public QPDFValue
{
public:
- virtual ~QPDF_Dictionary() = default;
+ ~QPDF_Dictionary() override = default;
static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle> const& items);
static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle>&& items);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
- virtual void disconnect();
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
+ void disconnect() override;
// hasKey() and getKeys() treat keys with null values as if they aren't there. getKey() returns
// null for the value of a non-existent key. This is as per the PDF spec.
diff --git a/libqpdf/qpdf/QPDF_InlineImage.hh b/libqpdf/qpdf/QPDF_InlineImage.hh
index 553d1d71..bee12354 100644
--- a/libqpdf/qpdf/QPDF_InlineImage.hh
+++ b/libqpdf/qpdf/QPDF_InlineImage.hh
@@ -6,13 +6,13 @@
class QPDF_InlineImage: public QPDFValue
{
public:
- virtual ~QPDF_InlineImage() = default;
+ ~QPDF_InlineImage() override = default;
static std::shared_ptr<QPDFObject> create(std::string const& val);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
- virtual std::string
- getStringValue() const
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
+ std::string
+ getStringValue() const override
{
return val;
}
diff --git a/libqpdf/qpdf/QPDF_Integer.hh b/libqpdf/qpdf/QPDF_Integer.hh
index 180bb48a..2c2cf2f9 100644
--- a/libqpdf/qpdf/QPDF_Integer.hh
+++ b/libqpdf/qpdf/QPDF_Integer.hh
@@ -6,11 +6,11 @@
class QPDF_Integer: public QPDFValue
{
public:
- virtual ~QPDF_Integer() = default;
+ ~QPDF_Integer() override = default;
static std::shared_ptr<QPDFObject> create(long long value);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
long long getVal() const;
private:
diff --git a/libqpdf/qpdf/QPDF_Name.hh b/libqpdf/qpdf/QPDF_Name.hh
index 136ad5cb..c14d8659 100644
--- a/libqpdf/qpdf/QPDF_Name.hh
+++ b/libqpdf/qpdf/QPDF_Name.hh
@@ -6,16 +6,16 @@
class QPDF_Name: public QPDFValue
{
public:
- virtual ~QPDF_Name() = default;
+ ~QPDF_Name() override = default;
static std::shared_ptr<QPDFObject> create(std::string const& name);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
// Put # into strings with characters unsuitable for name token
static std::string normalizeName(std::string const& name);
- virtual std::string
- getStringValue() const
+ std::string
+ getStringValue() const override
{
return name;
}
diff --git a/libqpdf/qpdf/QPDF_Null.hh b/libqpdf/qpdf/QPDF_Null.hh
index 2bbb3db5..a59b7509 100644
--- a/libqpdf/qpdf/QPDF_Null.hh
+++ b/libqpdf/qpdf/QPDF_Null.hh
@@ -6,7 +6,7 @@
class QPDF_Null: public QPDFValue
{
public:
- virtual ~QPDF_Null() = default;
+ ~QPDF_Null() override = default;
static std::shared_ptr<QPDFObject> create();
static std::shared_ptr<QPDFObject> create(
std::shared_ptr<QPDFObject> parent,
@@ -16,9 +16,9 @@ class QPDF_Null: public QPDFValue
std::shared_ptr<QPDFValue> parent,
std::string_view const& static_descr,
std::string var_descr);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
private:
QPDF_Null();
diff --git a/libqpdf/qpdf/QPDF_Operator.hh b/libqpdf/qpdf/QPDF_Operator.hh
index 4fedb808..77aa5a17 100644
--- a/libqpdf/qpdf/QPDF_Operator.hh
+++ b/libqpdf/qpdf/QPDF_Operator.hh
@@ -6,13 +6,13 @@
class QPDF_Operator: public QPDFValue
{
public:
- virtual ~QPDF_Operator() = default;
+ ~QPDF_Operator() override = default;
static std::shared_ptr<QPDFObject> create(std::string const& val);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
- virtual std::string
- getStringValue() const
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
+ std::string
+ getStringValue() const override
{
return val;
}
diff --git a/libqpdf/qpdf/QPDF_Real.hh b/libqpdf/qpdf/QPDF_Real.hh
index f470e1a6..db5e0940 100644
--- a/libqpdf/qpdf/QPDF_Real.hh
+++ b/libqpdf/qpdf/QPDF_Real.hh
@@ -6,15 +6,15 @@
class QPDF_Real: public QPDFValue
{
public:
- virtual ~QPDF_Real() = default;
+ ~QPDF_Real() override = default;
static std::shared_ptr<QPDFObject> create(std::string const& val);
static std::shared_ptr<QPDFObject>
create(double value, int decimal_places, bool trim_trailing_zeroes);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
- virtual std::string
- getStringValue() const
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
+ std::string
+ getStringValue() const override
{
return val;
}
diff --git a/libqpdf/qpdf/QPDF_Reserved.hh b/libqpdf/qpdf/QPDF_Reserved.hh
index 8d6c74f8..9ba855b7 100644
--- a/libqpdf/qpdf/QPDF_Reserved.hh
+++ b/libqpdf/qpdf/QPDF_Reserved.hh
@@ -6,11 +6,11 @@
class QPDF_Reserved: public QPDFValue
{
public:
- virtual ~QPDF_Reserved() = default;
+ ~QPDF_Reserved() override = default;
static std::shared_ptr<QPDFObject> create();
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
private:
QPDF_Reserved();
diff --git a/libqpdf/qpdf/QPDF_Stream.hh b/libqpdf/qpdf/QPDF_Stream.hh
index 88331201..8488e157 100644
--- a/libqpdf/qpdf/QPDF_Stream.hh
+++ b/libqpdf/qpdf/QPDF_Stream.hh
@@ -16,19 +16,19 @@ class QPDF;
class QPDF_Stream: public QPDFValue
{
public:
- virtual ~QPDF_Stream() = default;
+ ~QPDF_Stream() override = default;
static std::shared_ptr<QPDFObject> create(
QPDF*,
QPDFObjGen const& og,
QPDFObjectHandle stream_dict,
qpdf_offset_t offset,
size_t length);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
- virtual void setDescription(
- QPDF*, std::shared_ptr<QPDFValue::Description>& description, qpdf_offset_t offset);
- virtual void disconnect();
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
+ void setDescription(
+ QPDF*, std::shared_ptr<QPDFValue::Description>& description, qpdf_offset_t offset) override;
+ void disconnect() override;
QPDFObjectHandle getDict() const;
bool isDataModified() const;
void setFilterOnWrite(bool);
diff --git a/libqpdf/qpdf/QPDF_String.hh b/libqpdf/qpdf/QPDF_String.hh
index d4a1bfd4..c34cafef 100644
--- a/libqpdf/qpdf/QPDF_String.hh
+++ b/libqpdf/qpdf/QPDF_String.hh
@@ -10,16 +10,16 @@ class QPDF_String: public QPDFValue
friend class QPDFWriter;
public:
- virtual ~QPDF_String() = default;
+ ~QPDF_String() override = default;
static std::shared_ptr<QPDFObject> create(std::string const& val);
static std::shared_ptr<QPDFObject> create_utf16(std::string const& utf8_val);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
std::string unparse(bool force_binary);
- virtual JSON getJSON(int json_version);
+ JSON getJSON(int json_version) override;
std::string getUTF8Val() const;
- virtual std::string
- getStringValue() const
+ std::string
+ getStringValue() const override
{
return val;
}
diff --git a/libqpdf/qpdf/QPDF_Unresolved.hh b/libqpdf/qpdf/QPDF_Unresolved.hh
index 43d2af31..0a1fa9a5 100644
--- a/libqpdf/qpdf/QPDF_Unresolved.hh
+++ b/libqpdf/qpdf/QPDF_Unresolved.hh
@@ -6,11 +6,11 @@
class QPDF_Unresolved: public QPDFValue
{
public:
- virtual ~QPDF_Unresolved() = default;
+ ~QPDF_Unresolved() override = default;
static std::shared_ptr<QPDFObject> create(QPDF* qpdf, QPDFObjGen const& og);
- virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);
- virtual std::string unparse();
- virtual JSON getJSON(int json_version);
+ std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
+ std::string unparse() override;
+ JSON getJSON(int json_version) override;
private:
QPDF_Unresolved(QPDF* qpdf, QPDFObjGen const& og);
diff --git a/libqpdf/qpdf/ResourceFinder.hh b/libqpdf/qpdf/ResourceFinder.hh
index d8cb32e6..1c4c59a7 100644
--- a/libqpdf/qpdf/ResourceFinder.hh
+++ b/libqpdf/qpdf/ResourceFinder.hh
@@ -7,7 +7,7 @@ class ResourceFinder: public QPDFObjectHandle::ParserCallbacks
{
public:
ResourceFinder();
- virtual ~ResourceFinder() = default;
+ ~ResourceFinder() override = default;
void handleObject(QPDFObjectHandle, size_t, size_t) override;
void handleEOF() override;
std::set<std::string> const& getNames() const;
diff --git a/libqpdf/qpdf/SF_ASCII85Decode.hh b/libqpdf/qpdf/SF_ASCII85Decode.hh
index 8cf85e66..d474904c 100644
--- a/libqpdf/qpdf/SF_ASCII85Decode.hh
+++ b/libqpdf/qpdf/SF_ASCII85Decode.hh
@@ -9,7 +9,7 @@ class SF_ASCII85Decode: public QPDFStreamFilter
{
public:
SF_ASCII85Decode() = default;
- virtual ~SF_ASCII85Decode() = default;
+ ~SF_ASCII85Decode() override = default;
Pipeline*
getDecodePipeline(Pipeline* next) override
diff --git a/libqpdf/qpdf/SF_ASCIIHexDecode.hh b/libqpdf/qpdf/SF_ASCIIHexDecode.hh
index cd87761e..bb21ede6 100644
--- a/libqpdf/qpdf/SF_ASCIIHexDecode.hh
+++ b/libqpdf/qpdf/SF_ASCIIHexDecode.hh
@@ -9,7 +9,7 @@ class SF_ASCIIHexDecode: public QPDFStreamFilter
{
public:
SF_ASCIIHexDecode() = default;
- virtual ~SF_ASCIIHexDecode() = default;
+ ~SF_ASCIIHexDecode() override = default;
Pipeline*
getDecodePipeline(Pipeline* next) override
diff --git a/libqpdf/qpdf/SF_DCTDecode.hh b/libqpdf/qpdf/SF_DCTDecode.hh
index 997ba89a..619cf9c4 100644
--- a/libqpdf/qpdf/SF_DCTDecode.hh
+++ b/libqpdf/qpdf/SF_DCTDecode.hh
@@ -9,7 +9,7 @@ class SF_DCTDecode: public QPDFStreamFilter
{
public:
SF_DCTDecode() = default;
- virtual ~SF_DCTDecode() = default;
+ ~SF_DCTDecode() override = default;
Pipeline*
getDecodePipeline(Pipeline* next) override
diff --git a/libqpdf/qpdf/SF_FlateLzwDecode.hh b/libqpdf/qpdf/SF_FlateLzwDecode.hh
index 2230ec58..203d893b 100644
--- a/libqpdf/qpdf/SF_FlateLzwDecode.hh
+++ b/libqpdf/qpdf/SF_FlateLzwDecode.hh
@@ -9,10 +9,10 @@ class SF_FlateLzwDecode: public QPDFStreamFilter
{
public:
SF_FlateLzwDecode(bool lzw);
- virtual ~SF_FlateLzwDecode() = default;
+ ~SF_FlateLzwDecode() override = default;
- virtual bool setDecodeParms(QPDFObjectHandle decode_parms);
- virtual Pipeline* getDecodePipeline(Pipeline* next);
+ bool setDecodeParms(QPDFObjectHandle decode_parms) override;
+ Pipeline* getDecodePipeline(Pipeline* next) override;
static std::shared_ptr<QPDFStreamFilter> flate_factory();
static std::shared_ptr<QPDFStreamFilter> lzw_factory();
diff --git a/libqpdf/qpdf/SF_RunLengthDecode.hh b/libqpdf/qpdf/SF_RunLengthDecode.hh
index 83c498dc..4a51cf6f 100644
--- a/libqpdf/qpdf/SF_RunLengthDecode.hh
+++ b/libqpdf/qpdf/SF_RunLengthDecode.hh
@@ -9,7 +9,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter
{
public:
SF_RunLengthDecode() = default;
- virtual ~SF_RunLengthDecode() = default;
+ ~SF_RunLengthDecode() override = default;
Pipeline*
getDecodePipeline(Pipeline* next) override
diff --git a/libqpdf/qpdf/SecureRandomDataProvider.hh b/libqpdf/qpdf/SecureRandomDataProvider.hh
index d701a905..f6a29b76 100644
--- a/libqpdf/qpdf/SecureRandomDataProvider.hh
+++ b/libqpdf/qpdf/SecureRandomDataProvider.hh
@@ -7,8 +7,8 @@ class SecureRandomDataProvider: public RandomDataProvider
{
public:
SecureRandomDataProvider() = default;
- virtual ~SecureRandomDataProvider() = default;
- virtual void provideRandomData(unsigned char* data, size_t len);
+ ~SecureRandomDataProvider() override = default;
+ void provideRandomData(unsigned char* data, size_t len) override;
static RandomDataProvider* getInstance();
};
diff --git a/libtests/json_parse.cc b/libtests/json_parse.cc
index 35abb68f..757b698b 100644
--- a/libtests/json_parse.cc
+++ b/libtests/json_parse.cc
@@ -10,7 +10,7 @@ namespace
class Reactor: public JSON::Reactor
{
public:
- virtual ~Reactor() = default;
+ ~Reactor() override = default;
void dictionaryStart() override;
void arrayStart() override;
void containerEnd(JSON const& value) override;
diff --git a/libtests/random.cc b/libtests/random.cc
index 899c264c..afd2ed6c 100644
--- a/libtests/random.cc
+++ b/libtests/random.cc
@@ -6,10 +6,10 @@
class BogusRandomDataProvider: public RandomDataProvider
{
public:
- virtual ~BogusRandomDataProvider() = default;
+ ~BogusRandomDataProvider() override = default;
BogusRandomDataProvider() = default;
- virtual void
- provideRandomData(unsigned char* data, size_t len)
+ void
+ provideRandomData(unsigned char* data, size_t len) override
{
for (size_t i = 0; i < len; ++i) {
data[i] = static_cast<unsigned char>(i & 0xff);
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc
index 0d68dbbd..6fdacf1b 100644
--- a/qpdf/test_driver.cc
+++ b/qpdf/test_driver.cc
@@ -51,7 +51,7 @@ class ExtendNameTree: public QPDFNameTreeObjectHelper
{
public:
ExtendNameTree(QPDFObjectHandle o, QPDF& q);
- virtual ~ExtendNameTree();
+ ~ExtendNameTree() override;
};
ExtendNameTree::ExtendNameTree(QPDFObjectHandle o, QPDF& q) :
@@ -71,9 +71,9 @@ class Provider: public QPDFObjectHandle::StreamDataProvider
b(b)
{
}
- virtual ~Provider() = default;
- virtual void
- provideStreamData(int objid, int generation, Pipeline* p)
+ ~Provider() override = default;
+ void
+ provideStreamData(int objid, int generation, Pipeline* p) override
{
// Don't change signature to use QPDFObjGen const& to detect problems forwarding to legacy
// implementations.
@@ -98,10 +98,10 @@ class Provider: public QPDFObjectHandle::StreamDataProvider
class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks
{
public:
- virtual ~ParserCallbacks() = default;
- virtual void contentSize(size_t size);
- virtual void handleObject(QPDFObjectHandle, size_t, size_t);
- virtual void handleEOF();
+ ~ParserCallbacks() override = default;
+ void contentSize(size_t size) override;
+ void handleObject(QPDFObjectHandle, size_t, size_t) override;
+ void handleEOF() override;
};
void
@@ -137,9 +137,9 @@ class TokenFilter: public QPDFObjectHandle::TokenFilter
{
public:
TokenFilter() = default;
- virtual ~TokenFilter() = default;
- virtual void
- handleToken(QPDFTokenizer::Token const& t)
+ ~TokenFilter() override = default;
+ void
+ handleToken(QPDFTokenizer::Token const& t) override
{
if (t == QPDFTokenizer::Token(QPDFTokenizer::tt_string, "Potato")) {
// Exercise unparsing of strings by token constructor
@@ -148,8 +148,8 @@ class TokenFilter: public QPDFObjectHandle::TokenFilter
writeToken(t);
}
}
- virtual void
- handleEOF()
+ void
+ handleEOF() override
{
writeToken(QPDFTokenizer::Token(QPDFTokenizer::tt_name, "/bye"));
write("\n");
diff --git a/qpdf/test_large_file.cc b/qpdf/test_large_file.cc
index 3c041deb..f273c783 100644
--- a/qpdf/test_large_file.cc
+++ b/qpdf/test_large_file.cc
@@ -61,9 +61,9 @@ class ImageChecker: public Pipeline
{
public:
ImageChecker(size_t n);
- virtual ~ImageChecker() = default;
- virtual void write(unsigned char const* data, size_t len);
- virtual void finish();
+ ~ImageChecker() override = default;
+ void write(unsigned char const* data, size_t len) override;
+ void finish() override;
private:
size_t n;
@@ -102,8 +102,8 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider
{
public:
ImageProvider(size_t n);
- virtual ~ImageProvider() = default;
- virtual void provideStreamData(int objid, int generation, Pipeline* pipeline);
+ ~ImageProvider() override = default;
+ void provideStreamData(int objid, int generation, Pipeline* pipeline) override;
private:
size_t n;
diff --git a/qpdf/test_tokenizer.cc b/qpdf/test_tokenizer.cc
index c0d13054..28aa3069 100644
--- a/qpdf/test_tokenizer.cc
+++ b/qpdf/test_tokenizer.cc
@@ -28,8 +28,8 @@ class Finder: public InputSource::Finder
str(str)
{
}
- virtual ~Finder() = default;
- virtual bool check();
+ ~Finder() override = default;
+ bool check() override;
private:
std::shared_ptr<InputSource> is;