Commit 0ac005f0d96b427d1ddc92af5805aa05bfe86aca

Authored by m-holger
1 parent ae3642ce

Code tidy - Clang-Tidy rule modernize-use-override

Showing 63 changed files with 199 additions and 199 deletions
include/qpdf/BufferInputSource.hh
@@ -32,21 +32,21 @@ class QPDF_DLL_CLASS BufferInputSource: public InputSource @@ -32,21 +32,21 @@ class QPDF_DLL_CLASS BufferInputSource: public InputSource
32 QPDF_DLL 32 QPDF_DLL
33 BufferInputSource(std::string const& description, std::string const& contents); 33 BufferInputSource(std::string const& description, std::string const& contents);
34 QPDF_DLL 34 QPDF_DLL
35 - virtual ~BufferInputSource(); 35 + ~BufferInputSource() override;
36 QPDF_DLL 36 QPDF_DLL
37 - virtual qpdf_offset_t findAndSkipNextEOL(); 37 + qpdf_offset_t findAndSkipNextEOL() override;
38 QPDF_DLL 38 QPDF_DLL
39 - virtual std::string const& getName() const; 39 + std::string const& getName() const override;
40 QPDF_DLL 40 QPDF_DLL
41 - virtual qpdf_offset_t tell(); 41 + qpdf_offset_t tell() override;
42 QPDF_DLL 42 QPDF_DLL
43 - virtual void seek(qpdf_offset_t offset, int whence); 43 + void seek(qpdf_offset_t offset, int whence) override;
44 QPDF_DLL 44 QPDF_DLL
45 - virtual void rewind(); 45 + void rewind() override;
46 QPDF_DLL 46 QPDF_DLL
47 - virtual size_t read(char* buffer, size_t length); 47 + size_t read(char* buffer, size_t length) override;
48 QPDF_DLL 48 QPDF_DLL
49 - virtual void unreadCh(char ch); 49 + void unreadCh(char ch) override;
50 50
51 private: 51 private:
52 bool own_memory; 52 bool own_memory;
include/qpdf/ClosedFileInputSource.hh
@@ -37,21 +37,21 @@ class QPDF_DLL_CLASS ClosedFileInputSource: public InputSource @@ -37,21 +37,21 @@ class QPDF_DLL_CLASS ClosedFileInputSource: public InputSource
37 QPDF_DLL 37 QPDF_DLL
38 ClosedFileInputSource(char const* filename); 38 ClosedFileInputSource(char const* filename);
39 QPDF_DLL 39 QPDF_DLL
40 - virtual ~ClosedFileInputSource(); 40 + ~ClosedFileInputSource() override;
41 QPDF_DLL 41 QPDF_DLL
42 - virtual qpdf_offset_t findAndSkipNextEOL(); 42 + qpdf_offset_t findAndSkipNextEOL() override;
43 QPDF_DLL 43 QPDF_DLL
44 - virtual std::string const& getName() const; 44 + std::string const& getName() const override;
45 QPDF_DLL 45 QPDF_DLL
46 - virtual qpdf_offset_t tell(); 46 + qpdf_offset_t tell() override;
47 QPDF_DLL 47 QPDF_DLL
48 - virtual void seek(qpdf_offset_t offset, int whence); 48 + void seek(qpdf_offset_t offset, int whence) override;
49 QPDF_DLL 49 QPDF_DLL
50 - virtual void rewind(); 50 + void rewind() override;
51 QPDF_DLL 51 QPDF_DLL
52 - virtual size_t read(char* buffer, size_t length); 52 + size_t read(char* buffer, size_t length) override;
53 QPDF_DLL 53 QPDF_DLL
54 - virtual void unreadCh(char ch); 54 + void unreadCh(char ch) override;
55 55
56 // The file stays open between calls to stayOpen(true) and stayOpen(false). You can use this to 56 // The file stays open between calls to stayOpen(true) and stayOpen(false). You can use this to
57 // surround multiple operations on a single ClosedFileInputSource to reduce the overhead of a 57 // surround multiple operations on a single ClosedFileInputSource to reduce the overhead of a
include/qpdf/FileInputSource.hh
@@ -35,21 +35,21 @@ class QPDF_DLL_CLASS FileInputSource: public InputSource @@ -35,21 +35,21 @@ class QPDF_DLL_CLASS FileInputSource: public InputSource
35 QPDF_DLL 35 QPDF_DLL
36 void setFile(char const* description, FILE* filep, bool close_file); 36 void setFile(char const* description, FILE* filep, bool close_file);
37 QPDF_DLL 37 QPDF_DLL
38 - virtual ~FileInputSource(); 38 + ~FileInputSource() override;
39 QPDF_DLL 39 QPDF_DLL
40 - virtual qpdf_offset_t findAndSkipNextEOL(); 40 + qpdf_offset_t findAndSkipNextEOL() override;
41 QPDF_DLL 41 QPDF_DLL
42 - virtual std::string const& getName() const; 42 + std::string const& getName() const override;
43 QPDF_DLL 43 QPDF_DLL
44 - virtual qpdf_offset_t tell(); 44 + qpdf_offset_t tell() override;
45 QPDF_DLL 45 QPDF_DLL
46 - virtual void seek(qpdf_offset_t offset, int whence); 46 + void seek(qpdf_offset_t offset, int whence) override;
47 QPDF_DLL 47 QPDF_DLL
48 - virtual void rewind(); 48 + void rewind() override;
49 QPDF_DLL 49 QPDF_DLL
50 - virtual size_t read(char* buffer, size_t length); 50 + size_t read(char* buffer, size_t length) override;
51 QPDF_DLL 51 QPDF_DLL
52 - virtual void unreadCh(char ch); 52 + void unreadCh(char ch) override;
53 53
54 private: 54 private:
55 FileInputSource(FileInputSource const&) = delete; 55 FileInputSource(FileInputSource const&) = delete;
include/qpdf/Pl_Concatenate.hh
@@ -32,13 +32,13 @@ class QPDF_DLL_CLASS Pl_Concatenate: public Pipeline @@ -32,13 +32,13 @@ class QPDF_DLL_CLASS Pl_Concatenate: public Pipeline
32 QPDF_DLL 32 QPDF_DLL
33 Pl_Concatenate(char const* identifier, Pipeline* next); 33 Pl_Concatenate(char const* identifier, Pipeline* next);
34 QPDF_DLL 34 QPDF_DLL
35 - virtual ~Pl_Concatenate(); 35 + ~Pl_Concatenate() override;
36 36
37 QPDF_DLL 37 QPDF_DLL
38 - virtual void write(unsigned char const* data, size_t len); 38 + void write(unsigned char const* data, size_t len) override;
39 39
40 QPDF_DLL 40 QPDF_DLL
41 - virtual void finish(); 41 + void finish() override;
42 42
43 // At the very end, call manualFinish to actually finish the rest of the pipeline. 43 // At the very end, call manualFinish to actually finish the rest of the pipeline.
44 QPDF_DLL 44 QPDF_DLL
include/qpdf/Pl_Count.hh
@@ -30,11 +30,11 @@ class QPDF_DLL_CLASS Pl_Count: public Pipeline @@ -30,11 +30,11 @@ class QPDF_DLL_CLASS Pl_Count: public Pipeline
30 QPDF_DLL 30 QPDF_DLL
31 Pl_Count(char const* identifier, Pipeline* next); 31 Pl_Count(char const* identifier, Pipeline* next);
32 QPDF_DLL 32 QPDF_DLL
33 - virtual ~Pl_Count(); 33 + ~Pl_Count() override;
34 QPDF_DLL 34 QPDF_DLL
35 - virtual void write(unsigned char const*, size_t); 35 + void write(unsigned char const*, size_t) override;
36 QPDF_DLL 36 QPDF_DLL
37 - virtual void finish(); 37 + void finish() override;
38 // Returns the number of bytes written 38 // Returns the number of bytes written
39 QPDF_DLL 39 QPDF_DLL
40 qpdf_offset_t getCount() const; 40 qpdf_offset_t getCount() const;
include/qpdf/Pl_DCT.hh
@@ -56,12 +56,12 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline @@ -56,12 +56,12 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline
56 CompressConfig* config_callback = nullptr); 56 CompressConfig* config_callback = nullptr);
57 57
58 QPDF_DLL 58 QPDF_DLL
59 - virtual ~Pl_DCT(); 59 + ~Pl_DCT() override;
60 60
61 QPDF_DLL 61 QPDF_DLL
62 - virtual void write(unsigned char const* data, size_t len); 62 + void write(unsigned char const* data, size_t len) override;
63 QPDF_DLL 63 QPDF_DLL
64 - virtual void finish(); 64 + void finish() override;
65 65
66 private: 66 private:
67 QPDF_DLL_PRIVATE 67 QPDF_DLL_PRIVATE
include/qpdf/Pl_Discard.hh
@@ -31,11 +31,11 @@ class QPDF_DLL_CLASS Pl_Discard: public Pipeline @@ -31,11 +31,11 @@ class QPDF_DLL_CLASS Pl_Discard: public Pipeline
31 QPDF_DLL 31 QPDF_DLL
32 Pl_Discard(); 32 Pl_Discard();
33 QPDF_DLL 33 QPDF_DLL
34 - virtual ~Pl_Discard(); 34 + ~Pl_Discard() override;
35 QPDF_DLL 35 QPDF_DLL
36 - virtual void write(unsigned char const*, size_t); 36 + void write(unsigned char const*, size_t) override;
37 QPDF_DLL 37 QPDF_DLL
38 - virtual void finish(); 38 + void finish() override;
39 39
40 private: 40 private:
41 class QPDF_DLL_PRIVATE Members 41 class QPDF_DLL_PRIVATE Members
include/qpdf/Pl_Flate.hh
@@ -40,12 +40,12 @@ class QPDF_DLL_CLASS Pl_Flate: public Pipeline @@ -40,12 +40,12 @@ class QPDF_DLL_CLASS Pl_Flate: public Pipeline
40 action_e action, 40 action_e action,
41 unsigned int out_bufsize = def_bufsize); 41 unsigned int out_bufsize = def_bufsize);
42 QPDF_DLL 42 QPDF_DLL
43 - virtual ~Pl_Flate(); 43 + ~Pl_Flate() override;
44 44
45 QPDF_DLL 45 QPDF_DLL
46 - virtual void write(unsigned char const* data, size_t len); 46 + void write(unsigned char const* data, size_t len) override;
47 QPDF_DLL 47 QPDF_DLL
48 - virtual void finish(); 48 + void finish() override;
49 49
50 // Globally set compression level from 1 (fastest, least 50 // Globally set compression level from 1 (fastest, least
51 // compression) to 9 (slowest, most compression). Use -1 to set 51 // compression) to 9 (slowest, most compression). Use -1 to set
include/qpdf/Pl_Function.hh
@@ -54,12 +54,12 @@ class QPDF_DLL_CLASS Pl_Function: public Pipeline @@ -54,12 +54,12 @@ class QPDF_DLL_CLASS Pl_Function: public Pipeline
54 Pl_Function(char const* identifier, Pipeline* next, writer_c_char_t fn, void* udata); 54 Pl_Function(char const* identifier, Pipeline* next, writer_c_char_t fn, void* udata);
55 55
56 QPDF_DLL 56 QPDF_DLL
57 - virtual ~Pl_Function(); 57 + ~Pl_Function() override;
58 58
59 QPDF_DLL 59 QPDF_DLL
60 - virtual void write(unsigned char const* buf, size_t len); 60 + void write(unsigned char const* buf, size_t len) override;
61 QPDF_DLL 61 QPDF_DLL
62 - virtual void finish(); 62 + void finish() override;
63 63
64 private: 64 private:
65 class QPDF_DLL_PRIVATE Members 65 class QPDF_DLL_PRIVATE Members
include/qpdf/Pl_OStream.hh
@@ -36,12 +36,12 @@ class QPDF_DLL_CLASS Pl_OStream: public Pipeline @@ -36,12 +36,12 @@ class QPDF_DLL_CLASS Pl_OStream: public Pipeline
36 QPDF_DLL 36 QPDF_DLL
37 Pl_OStream(char const* identifier, std::ostream& os); 37 Pl_OStream(char const* identifier, std::ostream& os);
38 QPDF_DLL 38 QPDF_DLL
39 - virtual ~Pl_OStream(); 39 + ~Pl_OStream() override;
40 40
41 QPDF_DLL 41 QPDF_DLL
42 - virtual void write(unsigned char const* buf, size_t len); 42 + void write(unsigned char const* buf, size_t len) override;
43 QPDF_DLL 43 QPDF_DLL
44 - virtual void finish(); 44 + void finish() override;
45 45
46 private: 46 private:
47 class QPDF_DLL_PRIVATE Members 47 class QPDF_DLL_PRIVATE Members
include/qpdf/Pl_QPDFTokenizer.hh
@@ -45,11 +45,11 @@ class QPDF_DLL_CLASS Pl_QPDFTokenizer: public Pipeline @@ -45,11 +45,11 @@ class QPDF_DLL_CLASS Pl_QPDFTokenizer: public Pipeline
45 Pl_QPDFTokenizer( 45 Pl_QPDFTokenizer(
46 char const* identifier, QPDFObjectHandle::TokenFilter* filter, Pipeline* next = nullptr); 46 char const* identifier, QPDFObjectHandle::TokenFilter* filter, Pipeline* next = nullptr);
47 QPDF_DLL 47 QPDF_DLL
48 - virtual ~Pl_QPDFTokenizer(); 48 + ~Pl_QPDFTokenizer() override;
49 QPDF_DLL 49 QPDF_DLL
50 - virtual void write(unsigned char const* buf, size_t len); 50 + void write(unsigned char const* buf, size_t len) override;
51 QPDF_DLL 51 QPDF_DLL
52 - virtual void finish(); 52 + void finish() override;
53 53
54 private: 54 private:
55 class QPDF_DLL_PRIVATE Members 55 class QPDF_DLL_PRIVATE Members
include/qpdf/Pl_RunLength.hh
@@ -29,12 +29,12 @@ class QPDF_DLL_CLASS Pl_RunLength: public Pipeline @@ -29,12 +29,12 @@ class QPDF_DLL_CLASS Pl_RunLength: public Pipeline
29 QPDF_DLL 29 QPDF_DLL
30 Pl_RunLength(char const* identifier, Pipeline* next, action_e action); 30 Pl_RunLength(char const* identifier, Pipeline* next, action_e action);
31 QPDF_DLL 31 QPDF_DLL
32 - virtual ~Pl_RunLength(); 32 + ~Pl_RunLength() override;
33 33
34 QPDF_DLL 34 QPDF_DLL
35 - virtual void write(unsigned char const* data, size_t len); 35 + void write(unsigned char const* data, size_t len) override;
36 QPDF_DLL 36 QPDF_DLL
37 - virtual void finish(); 37 + void finish() override;
38 38
39 private: 39 private:
40 QPDF_DLL_PRIVATE 40 QPDF_DLL_PRIVATE
include/qpdf/Pl_StdioFile.hh
@@ -36,12 +36,12 @@ class QPDF_DLL_CLASS Pl_StdioFile: public Pipeline @@ -36,12 +36,12 @@ class QPDF_DLL_CLASS Pl_StdioFile: public Pipeline
36 QPDF_DLL 36 QPDF_DLL
37 Pl_StdioFile(char const* identifier, FILE* f); 37 Pl_StdioFile(char const* identifier, FILE* f);
38 QPDF_DLL 38 QPDF_DLL
39 - virtual ~Pl_StdioFile(); 39 + ~Pl_StdioFile() override;
40 40
41 QPDF_DLL 41 QPDF_DLL
42 - virtual void write(unsigned char const* buf, size_t len); 42 + void write(unsigned char const* buf, size_t len) override;
43 QPDF_DLL 43 QPDF_DLL
44 - virtual void finish(); 44 + void finish() override;
45 45
46 private: 46 private:
47 class QPDF_DLL_PRIVATE Members 47 class QPDF_DLL_PRIVATE Members
include/qpdf/Pl_String.hh
@@ -41,12 +41,12 @@ class QPDF_DLL_CLASS Pl_String: public Pipeline @@ -41,12 +41,12 @@ class QPDF_DLL_CLASS Pl_String: public Pipeline
41 QPDF_DLL 41 QPDF_DLL
42 Pl_String(char const* identifier, Pipeline* next, std::string& s); 42 Pl_String(char const* identifier, Pipeline* next, std::string& s);
43 QPDF_DLL 43 QPDF_DLL
44 - virtual ~Pl_String(); 44 + ~Pl_String() override;
45 45
46 QPDF_DLL 46 QPDF_DLL
47 - virtual void write(unsigned char const* buf, size_t len); 47 + void write(unsigned char const* buf, size_t len) override;
48 QPDF_DLL 48 QPDF_DLL
49 - virtual void finish(); 49 + void finish() override;
50 50
51 private: 51 private:
52 class QPDF_DLL_PRIVATE Members 52 class QPDF_DLL_PRIVATE Members
include/qpdf/QPDF.hh
@@ -942,8 +942,8 @@ class QPDF @@ -942,8 +942,8 @@ class QPDF
942 { 942 {
943 public: 943 public:
944 CopiedStreamDataProvider(QPDF& destination_qpdf); 944 CopiedStreamDataProvider(QPDF& destination_qpdf);
945 - virtual ~CopiedStreamDataProvider() = default;  
946 - virtual bool provideStreamData( 945 + ~CopiedStreamDataProvider() override = default;
  946 + bool provideStreamData(
947 QPDFObjGen const& og, 947 QPDFObjGen const& og,
948 Pipeline* pipeline, 948 Pipeline* pipeline,
949 bool suppress_warnings, 949 bool suppress_warnings,
@@ -963,8 +963,8 @@ class QPDF @@ -963,8 +963,8 @@ class QPDF
963 963
964 public: 964 public:
965 StringDecrypter(QPDF* qpdf, QPDFObjGen const& og); 965 StringDecrypter(QPDF* qpdf, QPDFObjGen const& og);
966 - virtual ~StringDecrypter() = default;  
967 - virtual void decryptString(std::string& val); 966 + ~StringDecrypter() override = default;
  967 + void decryptString(std::string& val) override;
968 968
969 private: 969 private:
970 QPDF* qpdf; 970 QPDF* qpdf;
@@ -1308,9 +1308,9 @@ class QPDF @@ -1308,9 +1308,9 @@ class QPDF
1308 checker(checker) 1308 checker(checker)
1309 { 1309 {
1310 } 1310 }
1311 - virtual ~PatternFinder() = default;  
1312 - virtual bool  
1313 - check() 1311 + ~PatternFinder() override = default;
  1312 + bool
  1313 + check() override
1314 { 1314 {
1315 return (this->qpdf.*checker)(); 1315 return (this->qpdf.*checker)();
1316 } 1316 }
include/qpdf/QPDFAcroFormDocumentHelper.hh
@@ -71,7 +71,7 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper @@ -71,7 +71,7 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper
71 QPDF_DLL 71 QPDF_DLL
72 QPDFAcroFormDocumentHelper(QPDF&); 72 QPDFAcroFormDocumentHelper(QPDF&);
73 QPDF_DLL 73 QPDF_DLL
74 - virtual ~QPDFAcroFormDocumentHelper() = default; 74 + ~QPDFAcroFormDocumentHelper() override = default;
75 75
76 // This class lazily creates an internal cache of the mapping among form fields, annotations, 76 // This class lazily creates an internal cache of the mapping among form fields, annotations,
77 // and pages. Methods within this class preserve the validity of this cache. However, if you 77 // and pages. Methods within this class preserve the validity of this cache. However, if you
include/qpdf/QPDFAnnotationObjectHelper.hh
@@ -30,7 +30,7 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper @@ -30,7 +30,7 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper
30 QPDF_DLL 30 QPDF_DLL
31 QPDFAnnotationObjectHelper(QPDFObjectHandle); 31 QPDFAnnotationObjectHelper(QPDFObjectHandle);
32 QPDF_DLL 32 QPDF_DLL
33 - virtual ~QPDFAnnotationObjectHelper() = default; 33 + ~QPDFAnnotationObjectHelper() override = default;
34 34
35 // This class provides helper methods for annotations. More functionality will likely be added 35 // This class provides helper methods for annotations. More functionality will likely be added
36 // in the future. 36 // in the future.
include/qpdf/QPDFEFStreamObjectHelper.hh
@@ -35,7 +35,7 @@ class QPDFEFStreamObjectHelper: public QPDFObjectHelper @@ -35,7 +35,7 @@ class QPDFEFStreamObjectHelper: public QPDFObjectHelper
35 QPDF_DLL 35 QPDF_DLL
36 QPDFEFStreamObjectHelper(QPDFObjectHandle); 36 QPDFEFStreamObjectHelper(QPDFObjectHandle);
37 QPDF_DLL 37 QPDF_DLL
38 - virtual ~QPDFEFStreamObjectHelper() = default; 38 + ~QPDFEFStreamObjectHelper() override = default;
39 39
40 // Date parameters are strings that conform to the PDF spec for date/time strings, which is 40 // Date parameters are strings that conform to the PDF spec for date/time strings, which is
41 // "D:yyyymmddhhmmss<z>" where <z> is either "Z" for UTC or "-hh'mm'" or "+hh'mm'" for timezone 41 // "D:yyyymmddhhmmss<z>" where <z> is either "Z" for UTC or "-hh'mm'" or "+hh'mm'" for timezone
include/qpdf/QPDFEmbeddedFileDocumentHelper.hh
@@ -39,7 +39,7 @@ class QPDFEmbeddedFileDocumentHelper: public QPDFDocumentHelper @@ -39,7 +39,7 @@ class QPDFEmbeddedFileDocumentHelper: public QPDFDocumentHelper
39 QPDF_DLL 39 QPDF_DLL
40 QPDFEmbeddedFileDocumentHelper(QPDF&); 40 QPDFEmbeddedFileDocumentHelper(QPDF&);
41 QPDF_DLL 41 QPDF_DLL
42 - virtual ~QPDFEmbeddedFileDocumentHelper() = default; 42 + ~QPDFEmbeddedFileDocumentHelper() override = default;
43 43
44 QPDF_DLL 44 QPDF_DLL
45 bool hasEmbeddedFiles() const; 45 bool hasEmbeddedFiles() const;
include/qpdf/QPDFExc.hh
@@ -37,7 +37,7 @@ class QPDF_DLL_CLASS QPDFExc: public std::runtime_error @@ -37,7 +37,7 @@ class QPDF_DLL_CLASS QPDFExc: public std::runtime_error
37 qpdf_offset_t offset, 37 qpdf_offset_t offset,
38 std::string const& message); 38 std::string const& message);
39 QPDF_DLL 39 QPDF_DLL
40 - virtual ~QPDFExc() noexcept = default; 40 + ~QPDFExc() noexcept override = default;
41 41
42 // To get a complete error string, call what(), provided by std::exception. The accessors below 42 // To get a complete error string, call what(), provided by std::exception. The accessors below
43 // return the original values used to create the exception. Only the error code and message are 43 // return the original values used to create the exception. Only the error code and message are
include/qpdf/QPDFFileSpecObjectHelper.hh
@@ -35,7 +35,7 @@ class QPDFFileSpecObjectHelper: public QPDFObjectHelper @@ -35,7 +35,7 @@ class QPDFFileSpecObjectHelper: public QPDFObjectHelper
35 QPDF_DLL 35 QPDF_DLL
36 QPDFFileSpecObjectHelper(QPDFObjectHandle); 36 QPDFFileSpecObjectHelper(QPDFObjectHandle);
37 QPDF_DLL 37 QPDF_DLL
38 - virtual ~QPDFFileSpecObjectHelper() = default; 38 + ~QPDFFileSpecObjectHelper() override = default;
39 39
40 QPDF_DLL 40 QPDF_DLL
41 std::string getDescription(); 41 std::string getDescription();
include/qpdf/QPDFFormFieldObjectHelper.hh
@@ -37,7 +37,7 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper @@ -37,7 +37,7 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper
37 QPDF_DLL 37 QPDF_DLL
38 QPDFFormFieldObjectHelper(QPDFObjectHandle); 38 QPDFFormFieldObjectHelper(QPDFObjectHandle);
39 QPDF_DLL 39 QPDF_DLL
40 - virtual ~QPDFFormFieldObjectHelper() = default; 40 + ~QPDFFormFieldObjectHelper() override = default;
41 41
42 QPDF_DLL 42 QPDF_DLL
43 bool isNull(); 43 bool isNull();
include/qpdf/QPDFNameTreeObjectHelper.hh
@@ -50,7 +50,7 @@ class QPDF_DLL_CLASS QPDFNameTreeObjectHelper: public QPDFObjectHelper @@ -50,7 +50,7 @@ class QPDF_DLL_CLASS QPDFNameTreeObjectHelper: public QPDFObjectHelper
50 static QPDFNameTreeObjectHelper newEmpty(QPDF&, bool auto_repair = true); 50 static QPDFNameTreeObjectHelper newEmpty(QPDF&, bool auto_repair = true);
51 51
52 QPDF_DLL 52 QPDF_DLL
53 - virtual ~QPDFNameTreeObjectHelper(); 53 + ~QPDFNameTreeObjectHelper() override;
54 54
55 // Return whether the name tree has an explicit entry for this name. 55 // Return whether the name tree has an explicit entry for this name.
56 QPDF_DLL 56 QPDF_DLL
include/qpdf/QPDFNumberTreeObjectHelper.hh
@@ -44,7 +44,7 @@ class QPDF_DLL_CLASS QPDFNumberTreeObjectHelper: public QPDFObjectHelper @@ -44,7 +44,7 @@ class QPDF_DLL_CLASS QPDFNumberTreeObjectHelper: public QPDFObjectHelper
44 QPDFNumberTreeObjectHelper(QPDFObjectHandle, QPDF&, bool auto_repair = true); 44 QPDFNumberTreeObjectHelper(QPDFObjectHandle, QPDF&, bool auto_repair = true);
45 45
46 QPDF_DLL 46 QPDF_DLL
47 - virtual ~QPDFNumberTreeObjectHelper(); 47 + ~QPDFNumberTreeObjectHelper() override;
48 48
49 // Create an empty number tree 49 // Create an empty number tree
50 QPDF_DLL 50 QPDF_DLL
include/qpdf/QPDFOutlineDocumentHelper.hh
@@ -41,7 +41,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper @@ -41,7 +41,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper
41 QPDF_DLL 41 QPDF_DLL
42 QPDFOutlineDocumentHelper(QPDF&); 42 QPDFOutlineDocumentHelper(QPDF&);
43 QPDF_DLL 43 QPDF_DLL
44 - virtual ~QPDFOutlineDocumentHelper() = default; 44 + ~QPDFOutlineDocumentHelper() override = default;
45 45
46 QPDF_DLL 46 QPDF_DLL
47 bool hasOutlines(); 47 bool hasOutlines();
include/qpdf/QPDFOutlineObjectHelper.hh
@@ -34,7 +34,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper @@ -34,7 +34,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper
34 { 34 {
35 public: 35 public:
36 QPDF_DLL 36 QPDF_DLL
37 - virtual ~QPDFOutlineObjectHelper() 37 + ~QPDFOutlineObjectHelper() override
38 { 38 {
39 // This must be cleared explicitly to avoid circular references that prevent cleanup of 39 // This must be cleared explicitly to avoid circular references that prevent cleanup of
40 // shared pointers. 40 // shared pointers.
include/qpdf/QPDFPageDocumentHelper.hh
@@ -37,7 +37,7 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper @@ -37,7 +37,7 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper
37 QPDF_DLL 37 QPDF_DLL
38 QPDFPageDocumentHelper(QPDF&); 38 QPDFPageDocumentHelper(QPDF&);
39 QPDF_DLL 39 QPDF_DLL
40 - virtual ~QPDFPageDocumentHelper() = default; 40 + ~QPDFPageDocumentHelper() override = default;
41 41
42 // Traverse page tree, and return all /Page objects wrapped in QPDFPageObjectHelper objects. 42 // Traverse page tree, and return all /Page objects wrapped in QPDFPageObjectHelper objects.
43 // Unlike with QPDF::getAllPages, the vector of pages returned by this call is not affected by 43 // Unlike with QPDF::getAllPages, the vector of pages returned by this call is not affected by
include/qpdf/QPDFPageLabelDocumentHelper.hh
@@ -44,7 +44,7 @@ class QPDFPageLabelDocumentHelper: public QPDFDocumentHelper @@ -44,7 +44,7 @@ class QPDFPageLabelDocumentHelper: public QPDFDocumentHelper
44 QPDF_DLL 44 QPDF_DLL
45 QPDFPageLabelDocumentHelper(QPDF&); 45 QPDFPageLabelDocumentHelper(QPDF&);
46 QPDF_DLL 46 QPDF_DLL
47 - virtual ~QPDFPageLabelDocumentHelper() = default; 47 + ~QPDFPageLabelDocumentHelper() override = default;
48 48
49 QPDF_DLL 49 QPDF_DLL
50 bool hasPageLabels(); 50 bool hasPageLabels();
include/qpdf/QPDFPageObjectHelper.hh
@@ -39,7 +39,7 @@ class QPDFPageObjectHelper: public QPDFObjectHelper @@ -39,7 +39,7 @@ class QPDFPageObjectHelper: public QPDFObjectHelper
39 QPDF_DLL 39 QPDF_DLL
40 QPDFPageObjectHelper(QPDFObjectHandle); 40 QPDFPageObjectHelper(QPDFObjectHandle);
41 QPDF_DLL 41 QPDF_DLL
42 - virtual ~QPDFPageObjectHelper() = default; 42 + ~QPDFPageObjectHelper() override = default;
43 43
44 // PAGE ATTRIBUTES 44 // PAGE ATTRIBUTES
45 45
include/qpdf/QPDFSystemError.hh
@@ -32,7 +32,7 @@ class QPDF_DLL_CLASS QPDFSystemError: public std::runtime_error @@ -32,7 +32,7 @@ class QPDF_DLL_CLASS QPDFSystemError: public std::runtime_error
32 QPDF_DLL 32 QPDF_DLL
33 QPDFSystemError(std::string const& description, int system_errno); 33 QPDFSystemError(std::string const& description, int system_errno);
34 QPDF_DLL 34 QPDF_DLL
35 - virtual ~QPDFSystemError() noexcept = default; 35 + ~QPDFSystemError() noexcept override = default;
36 36
37 // To get a complete error string, call what(), provided by std::exception. The accessors below 37 // To get a complete error string, call what(), provided by std::exception. The accessors below
38 // return the original values used to create the exception. 38 // return the original values used to create the exception.
include/qpdf/QPDFUsage.hh
@@ -30,7 +30,7 @@ class QPDF_DLL_CLASS QPDFUsage: public std::runtime_error @@ -30,7 +30,7 @@ class QPDF_DLL_CLASS QPDFUsage: public std::runtime_error
30 QPDF_DLL 30 QPDF_DLL
31 QPDFUsage(std::string const& msg); 31 QPDFUsage(std::string const& msg);
32 QPDF_DLL 32 QPDF_DLL
33 - virtual ~QPDFUsage() noexcept = default; 33 + ~QPDFUsage() noexcept override = default;
34 }; 34 };
35 35
36 #endif // QPDFUSAGE_HH 36 #endif // QPDFUSAGE_HH
include/qpdf/QPDFWriter.hh
@@ -92,7 +92,7 @@ class QPDFWriter @@ -92,7 +92,7 @@ class QPDFWriter
92 QPDF_DLL 92 QPDF_DLL
93 FunctionProgressReporter(std::function<void(int)>); 93 FunctionProgressReporter(std::function<void(int)>);
94 QPDF_DLL 94 QPDF_DLL
95 - virtual ~FunctionProgressReporter(); 95 + ~FunctionProgressReporter() override;
96 QPDF_DLL 96 QPDF_DLL
97 void reportProgress(int) override; 97 void reportProgress(int) override;
98 98
libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -469,8 +469,8 @@ namespace @@ -469,8 +469,8 @@ namespace
469 ResourceReplacer( 469 ResourceReplacer(
470 std::map<std::string, std::map<std::string, std::string>> const& dr_map, 470 std::map<std::string, std::map<std::string, std::string>> const& dr_map,
471 std::map<std::string, std::map<std::string, std::set<size_t>>> const& rnames); 471 std::map<std::string, std::map<std::string, std::set<size_t>>> const& rnames);
472 - virtual ~ResourceReplacer() = default;  
473 - virtual void handleToken(QPDFTokenizer::Token const&) override; 472 + ~ResourceReplacer() override = default;
  473 + void handleToken(QPDFTokenizer::Token const&) override;
474 474
475 private: 475 private:
476 size_t offset{0}; 476 size_t offset{0};
libqpdf/QPDFPageObjectHelper.cc
@@ -20,8 +20,8 @@ namespace @@ -20,8 +20,8 @@ namespace
20 from_page(from_page) 20 from_page(from_page)
21 { 21 {
22 } 22 }
23 - virtual ~ContentProvider() = default;  
24 - virtual void provideStreamData(QPDFObjGen const&, Pipeline* pipeline); 23 + ~ContentProvider() override = default;
  24 + void provideStreamData(QPDFObjGen const&, Pipeline* pipeline) override;
25 25
26 private: 26 private:
27 QPDFObjectHandle from_page; 27 QPDFObjectHandle from_page;
@@ -44,8 +44,8 @@ namespace @@ -44,8 +44,8 @@ namespace
44 { 44 {
45 public: 45 public:
46 InlineImageTracker(QPDF*, size_t min_size, QPDFObjectHandle resources); 46 InlineImageTracker(QPDF*, size_t min_size, QPDFObjectHandle resources);
47 - virtual ~InlineImageTracker() = default;  
48 - virtual void handleToken(QPDFTokenizer::Token const&); 47 + ~InlineImageTracker() override = default;
  48 + void handleToken(QPDFTokenizer::Token const&) override;
49 QPDFObjectHandle convertIIDict(QPDFObjectHandle odict); 49 QPDFObjectHandle convertIIDict(QPDFObjectHandle odict);
50 50
51 QPDF* qpdf; 51 QPDF* qpdf;
libqpdf/QPDF_json.cc
@@ -238,7 +238,7 @@ class QPDF::JSONReactor: public JSON::Reactor @@ -238,7 +238,7 @@ class QPDF::JSONReactor: public JSON::Reactor
238 } 238 }
239 } 239 }
240 } 240 }
241 - virtual ~JSONReactor() = default; 241 + ~JSONReactor() override = default;
242 void dictionaryStart() override; 242 void dictionaryStart() override;
243 void arrayStart() override; 243 void arrayStart() override;
244 void containerEnd(JSON const& value) override; 244 void containerEnd(JSON const& value) override;
libqpdf/qpdf/Pl_LZWDecoder.hh
@@ -10,9 +10,9 @@ class Pl_LZWDecoder: public Pipeline @@ -10,9 +10,9 @@ class Pl_LZWDecoder: public Pipeline
10 { 10 {
11 public: 11 public:
12 Pl_LZWDecoder(char const* identifier, Pipeline* next, bool early_code_change); 12 Pl_LZWDecoder(char const* identifier, Pipeline* next, bool early_code_change);
13 - virtual ~Pl_LZWDecoder() = default;  
14 - virtual void write(unsigned char const* buf, size_t len);  
15 - virtual void finish(); 13 + ~Pl_LZWDecoder() override = default;
  14 + void write(unsigned char const* buf, size_t len) override;
  15 + void finish() override;
16 16
17 private: 17 private:
18 void sendNextCode(); 18 void sendNextCode();
libqpdf/qpdf/Pl_MD5.hh
@@ -14,9 +14,9 @@ class Pl_MD5: public Pipeline @@ -14,9 +14,9 @@ class Pl_MD5: public Pipeline
14 { 14 {
15 public: 15 public:
16 Pl_MD5(char const* identifier, Pipeline* next); 16 Pl_MD5(char const* identifier, Pipeline* next);
17 - virtual ~Pl_MD5() = default;  
18 - virtual void write(unsigned char const*, size_t);  
19 - virtual void finish(); 17 + ~Pl_MD5() override = default;
  18 + void write(unsigned char const*, size_t) override;
  19 + void finish() override;
20 std::string getHexDigest(); 20 std::string getHexDigest();
21 // Enable/disable. Disabling the pipeline causes it to become a pass-through. This makes it 21 // Enable/disable. Disabling the pipeline causes it to become a pass-through. This makes it
22 // possible to stick an MD5 pipeline in a pipeline when it may or may not be required. Disabling 22 // possible to stick an MD5 pipeline in a pipeline when it may or may not be required. Disabling
libqpdf/qpdf/QPDF_Array.hh
@@ -9,14 +9,14 @@ @@ -9,14 +9,14 @@
9 class QPDF_Array: public QPDFValue 9 class QPDF_Array: public QPDFValue
10 { 10 {
11 public: 11 public:
12 - virtual ~QPDF_Array() = default; 12 + ~QPDF_Array() override = default;
13 static std::shared_ptr<QPDFObject> create(std::vector<QPDFObjectHandle> const& items); 13 static std::shared_ptr<QPDFObject> create(std::vector<QPDFObjectHandle> const& items);
14 static std::shared_ptr<QPDFObject> 14 static std::shared_ptr<QPDFObject>
15 create(std::vector<std::shared_ptr<QPDFObject>>&& items, bool sparse); 15 create(std::vector<std::shared_ptr<QPDFObject>>&& items, bool sparse);
16 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
17 - virtual std::string unparse();  
18 - virtual JSON getJSON(int json_version);  
19 - virtual void disconnect(); 16 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  17 + std::string unparse() override;
  18 + JSON getJSON(int json_version) override;
  19 + void disconnect() override;
20 20
21 int 21 int
22 size() const noexcept 22 size() const noexcept
libqpdf/qpdf/QPDF_Bool.hh
@@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
6 class QPDF_Bool: public QPDFValue 6 class QPDF_Bool: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Bool() = default; 9 + ~QPDF_Bool() override = default;
10 static std::shared_ptr<QPDFObject> create(bool val); 10 static std::shared_ptr<QPDFObject> create(bool val);
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version); 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
14 bool getVal() const; 14 bool getVal() const;
15 15
16 private: 16 private:
libqpdf/qpdf/QPDF_Destroyed.hh
@@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
6 class QPDF_Destroyed: public QPDFValue 6 class QPDF_Destroyed: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Destroyed() = default;  
10 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
11 - virtual std::string unparse();  
12 - virtual JSON getJSON(int json_version); 9 + ~QPDF_Destroyed() override = default;
  10 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  11 + std::string unparse() override;
  12 + JSON getJSON(int json_version) override;
13 static std::shared_ptr<QPDFValue> getInstance(); 13 static std::shared_ptr<QPDFValue> getInstance();
14 14
15 private: 15 private:
libqpdf/qpdf/QPDF_Dictionary.hh
@@ -11,13 +11,13 @@ @@ -11,13 +11,13 @@
11 class QPDF_Dictionary: public QPDFValue 11 class QPDF_Dictionary: public QPDFValue
12 { 12 {
13 public: 13 public:
14 - virtual ~QPDF_Dictionary() = default; 14 + ~QPDF_Dictionary() override = default;
15 static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle> const& items); 15 static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle> const& items);
16 static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle>&& items); 16 static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle>&& items);
17 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
18 - virtual std::string unparse();  
19 - virtual JSON getJSON(int json_version);  
20 - virtual void disconnect(); 17 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  18 + std::string unparse() override;
  19 + JSON getJSON(int json_version) override;
  20 + void disconnect() override;
21 21
22 // hasKey() and getKeys() treat keys with null values as if they aren't there. getKey() returns 22 // hasKey() and getKeys() treat keys with null values as if they aren't there. getKey() returns
23 // null for the value of a non-existent key. This is as per the PDF spec. 23 // null for the value of a non-existent key. This is as per the PDF spec.
libqpdf/qpdf/QPDF_InlineImage.hh
@@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
6 class QPDF_InlineImage: public QPDFValue 6 class QPDF_InlineImage: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_InlineImage() = default; 9 + ~QPDF_InlineImage() override = default;
10 static std::shared_ptr<QPDFObject> create(std::string const& val); 10 static std::shared_ptr<QPDFObject> create(std::string const& val);
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version);  
14 - virtual std::string  
15 - getStringValue() const 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
  14 + std::string
  15 + getStringValue() const override
16 { 16 {
17 return val; 17 return val;
18 } 18 }
libqpdf/qpdf/QPDF_Integer.hh
@@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
6 class QPDF_Integer: public QPDFValue 6 class QPDF_Integer: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Integer() = default; 9 + ~QPDF_Integer() override = default;
10 static std::shared_ptr<QPDFObject> create(long long value); 10 static std::shared_ptr<QPDFObject> create(long long value);
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version); 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
14 long long getVal() const; 14 long long getVal() const;
15 15
16 private: 16 private:
libqpdf/qpdf/QPDF_Name.hh
@@ -6,16 +6,16 @@ @@ -6,16 +6,16 @@
6 class QPDF_Name: public QPDFValue 6 class QPDF_Name: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Name() = default; 9 + ~QPDF_Name() override = default;
10 static std::shared_ptr<QPDFObject> create(std::string const& name); 10 static std::shared_ptr<QPDFObject> create(std::string const& name);
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version); 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
14 14
15 // Put # into strings with characters unsuitable for name token 15 // Put # into strings with characters unsuitable for name token
16 static std::string normalizeName(std::string const& name); 16 static std::string normalizeName(std::string const& name);
17 - virtual std::string  
18 - getStringValue() const 17 + std::string
  18 + getStringValue() const override
19 { 19 {
20 return name; 20 return name;
21 } 21 }
libqpdf/qpdf/QPDF_Null.hh
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 class QPDF_Null: public QPDFValue 6 class QPDF_Null: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Null() = default; 9 + ~QPDF_Null() override = default;
10 static std::shared_ptr<QPDFObject> create(); 10 static std::shared_ptr<QPDFObject> create();
11 static std::shared_ptr<QPDFObject> create( 11 static std::shared_ptr<QPDFObject> create(
12 std::shared_ptr<QPDFObject> parent, 12 std::shared_ptr<QPDFObject> parent,
@@ -16,9 +16,9 @@ class QPDF_Null: public QPDFValue @@ -16,9 +16,9 @@ class QPDF_Null: public QPDFValue
16 std::shared_ptr<QPDFValue> parent, 16 std::shared_ptr<QPDFValue> parent,
17 std::string_view const& static_descr, 17 std::string_view const& static_descr,
18 std::string var_descr); 18 std::string var_descr);
19 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
20 - virtual std::string unparse();  
21 - virtual JSON getJSON(int json_version); 19 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  20 + std::string unparse() override;
  21 + JSON getJSON(int json_version) override;
22 22
23 private: 23 private:
24 QPDF_Null(); 24 QPDF_Null();
libqpdf/qpdf/QPDF_Operator.hh
@@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
6 class QPDF_Operator: public QPDFValue 6 class QPDF_Operator: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Operator() = default; 9 + ~QPDF_Operator() override = default;
10 static std::shared_ptr<QPDFObject> create(std::string const& val); 10 static std::shared_ptr<QPDFObject> create(std::string const& val);
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version);  
14 - virtual std::string  
15 - getStringValue() const 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
  14 + std::string
  15 + getStringValue() const override
16 { 16 {
17 return val; 17 return val;
18 } 18 }
libqpdf/qpdf/QPDF_Real.hh
@@ -6,15 +6,15 @@ @@ -6,15 +6,15 @@
6 class QPDF_Real: public QPDFValue 6 class QPDF_Real: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Real() = default; 9 + ~QPDF_Real() override = default;
10 static std::shared_ptr<QPDFObject> create(std::string const& val); 10 static std::shared_ptr<QPDFObject> create(std::string const& val);
11 static std::shared_ptr<QPDFObject> 11 static std::shared_ptr<QPDFObject>
12 create(double value, int decimal_places, bool trim_trailing_zeroes); 12 create(double value, int decimal_places, bool trim_trailing_zeroes);
13 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
14 - virtual std::string unparse();  
15 - virtual JSON getJSON(int json_version);  
16 - virtual std::string  
17 - getStringValue() const 13 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  14 + std::string unparse() override;
  15 + JSON getJSON(int json_version) override;
  16 + std::string
  17 + getStringValue() const override
18 { 18 {
19 return val; 19 return val;
20 } 20 }
libqpdf/qpdf/QPDF_Reserved.hh
@@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
6 class QPDF_Reserved: public QPDFValue 6 class QPDF_Reserved: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Reserved() = default; 9 + ~QPDF_Reserved() override = default;
10 static std::shared_ptr<QPDFObject> create(); 10 static std::shared_ptr<QPDFObject> create();
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version); 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
14 14
15 private: 15 private:
16 QPDF_Reserved(); 16 QPDF_Reserved();
libqpdf/qpdf/QPDF_Stream.hh
@@ -16,19 +16,19 @@ class QPDF; @@ -16,19 +16,19 @@ class QPDF;
16 class QPDF_Stream: public QPDFValue 16 class QPDF_Stream: public QPDFValue
17 { 17 {
18 public: 18 public:
19 - virtual ~QPDF_Stream() = default; 19 + ~QPDF_Stream() override = default;
20 static std::shared_ptr<QPDFObject> create( 20 static std::shared_ptr<QPDFObject> create(
21 QPDF*, 21 QPDF*,
22 QPDFObjGen const& og, 22 QPDFObjGen const& og,
23 QPDFObjectHandle stream_dict, 23 QPDFObjectHandle stream_dict,
24 qpdf_offset_t offset, 24 qpdf_offset_t offset,
25 size_t length); 25 size_t length);
26 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
27 - virtual std::string unparse();  
28 - virtual JSON getJSON(int json_version);  
29 - virtual void setDescription(  
30 - QPDF*, std::shared_ptr<QPDFValue::Description>& description, qpdf_offset_t offset);  
31 - virtual void disconnect(); 26 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  27 + std::string unparse() override;
  28 + JSON getJSON(int json_version) override;
  29 + void setDescription(
  30 + QPDF*, std::shared_ptr<QPDFValue::Description>& description, qpdf_offset_t offset) override;
  31 + void disconnect() override;
32 QPDFObjectHandle getDict() const; 32 QPDFObjectHandle getDict() const;
33 bool isDataModified() const; 33 bool isDataModified() const;
34 void setFilterOnWrite(bool); 34 void setFilterOnWrite(bool);
libqpdf/qpdf/QPDF_String.hh
@@ -10,16 +10,16 @@ class QPDF_String: public QPDFValue @@ -10,16 +10,16 @@ class QPDF_String: public QPDFValue
10 friend class QPDFWriter; 10 friend class QPDFWriter;
11 11
12 public: 12 public:
13 - virtual ~QPDF_String() = default; 13 + ~QPDF_String() override = default;
14 static std::shared_ptr<QPDFObject> create(std::string const& val); 14 static std::shared_ptr<QPDFObject> create(std::string const& val);
15 static std::shared_ptr<QPDFObject> create_utf16(std::string const& utf8_val); 15 static std::shared_ptr<QPDFObject> create_utf16(std::string const& utf8_val);
16 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
17 - virtual std::string unparse(); 16 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  17 + std::string unparse() override;
18 std::string unparse(bool force_binary); 18 std::string unparse(bool force_binary);
19 - virtual JSON getJSON(int json_version); 19 + JSON getJSON(int json_version) override;
20 std::string getUTF8Val() const; 20 std::string getUTF8Val() const;
21 - virtual std::string  
22 - getStringValue() const 21 + std::string
  22 + getStringValue() const override
23 { 23 {
24 return val; 24 return val;
25 } 25 }
libqpdf/qpdf/QPDF_Unresolved.hh
@@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
6 class QPDF_Unresolved: public QPDFValue 6 class QPDF_Unresolved: public QPDFValue
7 { 7 {
8 public: 8 public:
9 - virtual ~QPDF_Unresolved() = default; 9 + ~QPDF_Unresolved() override = default;
10 static std::shared_ptr<QPDFObject> create(QPDF* qpdf, QPDFObjGen const& og); 10 static std::shared_ptr<QPDFObject> create(QPDF* qpdf, QPDFObjGen const& og);
11 - virtual std::shared_ptr<QPDFObject> copy(bool shallow = false);  
12 - virtual std::string unparse();  
13 - virtual JSON getJSON(int json_version); 11 + std::shared_ptr<QPDFObject> copy(bool shallow = false) override;
  12 + std::string unparse() override;
  13 + JSON getJSON(int json_version) override;
14 14
15 private: 15 private:
16 QPDF_Unresolved(QPDF* qpdf, QPDFObjGen const& og); 16 QPDF_Unresolved(QPDF* qpdf, QPDFObjGen const& og);
libqpdf/qpdf/ResourceFinder.hh
@@ -7,7 +7,7 @@ class ResourceFinder: public QPDFObjectHandle::ParserCallbacks @@ -7,7 +7,7 @@ class ResourceFinder: public QPDFObjectHandle::ParserCallbacks
7 { 7 {
8 public: 8 public:
9 ResourceFinder(); 9 ResourceFinder();
10 - virtual ~ResourceFinder() = default; 10 + ~ResourceFinder() override = default;
11 void handleObject(QPDFObjectHandle, size_t, size_t) override; 11 void handleObject(QPDFObjectHandle, size_t, size_t) override;
12 void handleEOF() override; 12 void handleEOF() override;
13 std::set<std::string> const& getNames() const; 13 std::set<std::string> const& getNames() const;
libqpdf/qpdf/SF_ASCII85Decode.hh
@@ -9,7 +9,7 @@ class SF_ASCII85Decode: public QPDFStreamFilter @@ -9,7 +9,7 @@ class SF_ASCII85Decode: public QPDFStreamFilter
9 { 9 {
10 public: 10 public:
11 SF_ASCII85Decode() = default; 11 SF_ASCII85Decode() = default;
12 - virtual ~SF_ASCII85Decode() = default; 12 + ~SF_ASCII85Decode() override = default;
13 13
14 Pipeline* 14 Pipeline*
15 getDecodePipeline(Pipeline* next) override 15 getDecodePipeline(Pipeline* next) override
libqpdf/qpdf/SF_ASCIIHexDecode.hh
@@ -9,7 +9,7 @@ class SF_ASCIIHexDecode: public QPDFStreamFilter @@ -9,7 +9,7 @@ class SF_ASCIIHexDecode: public QPDFStreamFilter
9 { 9 {
10 public: 10 public:
11 SF_ASCIIHexDecode() = default; 11 SF_ASCIIHexDecode() = default;
12 - virtual ~SF_ASCIIHexDecode() = default; 12 + ~SF_ASCIIHexDecode() override = default;
13 13
14 Pipeline* 14 Pipeline*
15 getDecodePipeline(Pipeline* next) override 15 getDecodePipeline(Pipeline* next) override
libqpdf/qpdf/SF_DCTDecode.hh
@@ -9,7 +9,7 @@ class SF_DCTDecode: public QPDFStreamFilter @@ -9,7 +9,7 @@ class SF_DCTDecode: public QPDFStreamFilter
9 { 9 {
10 public: 10 public:
11 SF_DCTDecode() = default; 11 SF_DCTDecode() = default;
12 - virtual ~SF_DCTDecode() = default; 12 + ~SF_DCTDecode() override = default;
13 13
14 Pipeline* 14 Pipeline*
15 getDecodePipeline(Pipeline* next) override 15 getDecodePipeline(Pipeline* next) override
libqpdf/qpdf/SF_FlateLzwDecode.hh
@@ -9,10 +9,10 @@ class SF_FlateLzwDecode: public QPDFStreamFilter @@ -9,10 +9,10 @@ class SF_FlateLzwDecode: public QPDFStreamFilter
9 { 9 {
10 public: 10 public:
11 SF_FlateLzwDecode(bool lzw); 11 SF_FlateLzwDecode(bool lzw);
12 - virtual ~SF_FlateLzwDecode() = default; 12 + ~SF_FlateLzwDecode() override = default;
13 13
14 - virtual bool setDecodeParms(QPDFObjectHandle decode_parms);  
15 - virtual Pipeline* getDecodePipeline(Pipeline* next); 14 + bool setDecodeParms(QPDFObjectHandle decode_parms) override;
  15 + Pipeline* getDecodePipeline(Pipeline* next) override;
16 16
17 static std::shared_ptr<QPDFStreamFilter> flate_factory(); 17 static std::shared_ptr<QPDFStreamFilter> flate_factory();
18 static std::shared_ptr<QPDFStreamFilter> lzw_factory(); 18 static std::shared_ptr<QPDFStreamFilter> lzw_factory();
libqpdf/qpdf/SF_RunLengthDecode.hh
@@ -9,7 +9,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter @@ -9,7 +9,7 @@ class SF_RunLengthDecode: public QPDFStreamFilter
9 { 9 {
10 public: 10 public:
11 SF_RunLengthDecode() = default; 11 SF_RunLengthDecode() = default;
12 - virtual ~SF_RunLengthDecode() = default; 12 + ~SF_RunLengthDecode() override = default;
13 13
14 Pipeline* 14 Pipeline*
15 getDecodePipeline(Pipeline* next) override 15 getDecodePipeline(Pipeline* next) override
libqpdf/qpdf/SecureRandomDataProvider.hh
@@ -7,8 +7,8 @@ class SecureRandomDataProvider: public RandomDataProvider @@ -7,8 +7,8 @@ class SecureRandomDataProvider: public RandomDataProvider
7 { 7 {
8 public: 8 public:
9 SecureRandomDataProvider() = default; 9 SecureRandomDataProvider() = default;
10 - virtual ~SecureRandomDataProvider() = default;  
11 - virtual void provideRandomData(unsigned char* data, size_t len); 10 + ~SecureRandomDataProvider() override = default;
  11 + void provideRandomData(unsigned char* data, size_t len) override;
12 static RandomDataProvider* getInstance(); 12 static RandomDataProvider* getInstance();
13 }; 13 };
14 14
libtests/json_parse.cc
@@ -10,7 +10,7 @@ namespace @@ -10,7 +10,7 @@ namespace
10 class Reactor: public JSON::Reactor 10 class Reactor: public JSON::Reactor
11 { 11 {
12 public: 12 public:
13 - virtual ~Reactor() = default; 13 + ~Reactor() override = default;
14 void dictionaryStart() override; 14 void dictionaryStart() override;
15 void arrayStart() override; 15 void arrayStart() override;
16 void containerEnd(JSON const& value) override; 16 void containerEnd(JSON const& value) override;
libtests/random.cc
@@ -6,10 +6,10 @@ @@ -6,10 +6,10 @@
6 class BogusRandomDataProvider: public RandomDataProvider 6 class BogusRandomDataProvider: public RandomDataProvider
7 { 7 {
8 public: 8 public:
9 - virtual ~BogusRandomDataProvider() = default; 9 + ~BogusRandomDataProvider() override = default;
10 BogusRandomDataProvider() = default; 10 BogusRandomDataProvider() = default;
11 - virtual void  
12 - provideRandomData(unsigned char* data, size_t len) 11 + void
  12 + provideRandomData(unsigned char* data, size_t len) override
13 { 13 {
14 for (size_t i = 0; i < len; ++i) { 14 for (size_t i = 0; i < len; ++i) {
15 data[i] = static_cast<unsigned char>(i & 0xff); 15 data[i] = static_cast<unsigned char>(i & 0xff);
qpdf/test_driver.cc
@@ -51,7 +51,7 @@ class ExtendNameTree: public QPDFNameTreeObjectHelper @@ -51,7 +51,7 @@ class ExtendNameTree: public QPDFNameTreeObjectHelper
51 { 51 {
52 public: 52 public:
53 ExtendNameTree(QPDFObjectHandle o, QPDF& q); 53 ExtendNameTree(QPDFObjectHandle o, QPDF& q);
54 - virtual ~ExtendNameTree(); 54 + ~ExtendNameTree() override;
55 }; 55 };
56 56
57 ExtendNameTree::ExtendNameTree(QPDFObjectHandle o, QPDF& q) : 57 ExtendNameTree::ExtendNameTree(QPDFObjectHandle o, QPDF& q) :
@@ -71,9 +71,9 @@ class Provider: public QPDFObjectHandle::StreamDataProvider @@ -71,9 +71,9 @@ class Provider: public QPDFObjectHandle::StreamDataProvider
71 b(b) 71 b(b)
72 { 72 {
73 } 73 }
74 - virtual ~Provider() = default;  
75 - virtual void  
76 - provideStreamData(int objid, int generation, Pipeline* p) 74 + ~Provider() override = default;
  75 + void
  76 + provideStreamData(int objid, int generation, Pipeline* p) override
77 { 77 {
78 // Don't change signature to use QPDFObjGen const& to detect problems forwarding to legacy 78 // Don't change signature to use QPDFObjGen const& to detect problems forwarding to legacy
79 // implementations. 79 // implementations.
@@ -98,10 +98,10 @@ class Provider: public QPDFObjectHandle::StreamDataProvider @@ -98,10 +98,10 @@ class Provider: public QPDFObjectHandle::StreamDataProvider
98 class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks 98 class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks
99 { 99 {
100 public: 100 public:
101 - virtual ~ParserCallbacks() = default;  
102 - virtual void contentSize(size_t size);  
103 - virtual void handleObject(QPDFObjectHandle, size_t, size_t);  
104 - virtual void handleEOF(); 101 + ~ParserCallbacks() override = default;
  102 + void contentSize(size_t size) override;
  103 + void handleObject(QPDFObjectHandle, size_t, size_t) override;
  104 + void handleEOF() override;
105 }; 105 };
106 106
107 void 107 void
@@ -137,9 +137,9 @@ class TokenFilter: public QPDFObjectHandle::TokenFilter @@ -137,9 +137,9 @@ class TokenFilter: public QPDFObjectHandle::TokenFilter
137 { 137 {
138 public: 138 public:
139 TokenFilter() = default; 139 TokenFilter() = default;
140 - virtual ~TokenFilter() = default;  
141 - virtual void  
142 - handleToken(QPDFTokenizer::Token const& t) 140 + ~TokenFilter() override = default;
  141 + void
  142 + handleToken(QPDFTokenizer::Token const& t) override
143 { 143 {
144 if (t == QPDFTokenizer::Token(QPDFTokenizer::tt_string, "Potato")) { 144 if (t == QPDFTokenizer::Token(QPDFTokenizer::tt_string, "Potato")) {
145 // Exercise unparsing of strings by token constructor 145 // Exercise unparsing of strings by token constructor
@@ -148,8 +148,8 @@ class TokenFilter: public QPDFObjectHandle::TokenFilter @@ -148,8 +148,8 @@ class TokenFilter: public QPDFObjectHandle::TokenFilter
148 writeToken(t); 148 writeToken(t);
149 } 149 }
150 } 150 }
151 - virtual void  
152 - handleEOF() 151 + void
  152 + handleEOF() override
153 { 153 {
154 writeToken(QPDFTokenizer::Token(QPDFTokenizer::tt_name, "/bye")); 154 writeToken(QPDFTokenizer::Token(QPDFTokenizer::tt_name, "/bye"));
155 write("\n"); 155 write("\n");
qpdf/test_large_file.cc
@@ -61,9 +61,9 @@ class ImageChecker: public Pipeline @@ -61,9 +61,9 @@ class ImageChecker: public Pipeline
61 { 61 {
62 public: 62 public:
63 ImageChecker(size_t n); 63 ImageChecker(size_t n);
64 - virtual ~ImageChecker() = default;  
65 - virtual void write(unsigned char const* data, size_t len);  
66 - virtual void finish(); 64 + ~ImageChecker() override = default;
  65 + void write(unsigned char const* data, size_t len) override;
  66 + void finish() override;
67 67
68 private: 68 private:
69 size_t n; 69 size_t n;
@@ -102,8 +102,8 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider @@ -102,8 +102,8 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider
102 { 102 {
103 public: 103 public:
104 ImageProvider(size_t n); 104 ImageProvider(size_t n);
105 - virtual ~ImageProvider() = default;  
106 - virtual void provideStreamData(int objid, int generation, Pipeline* pipeline); 105 + ~ImageProvider() override = default;
  106 + void provideStreamData(int objid, int generation, Pipeline* pipeline) override;
107 107
108 private: 108 private:
109 size_t n; 109 size_t n;
qpdf/test_tokenizer.cc
@@ -28,8 +28,8 @@ class Finder: public InputSource::Finder @@ -28,8 +28,8 @@ class Finder: public InputSource::Finder
28 str(str) 28 str(str)
29 { 29 {
30 } 30 }
31 - virtual ~Finder() = default;  
32 - virtual bool check(); 31 + ~Finder() override = default;
  32 + bool check() override;
33 33
34 private: 34 private:
35 std::shared_ptr<InputSource> is; 35 std::shared_ptr<InputSource> is;