aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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/InputSource.hh5
-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.hh185
-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/QPDFJob.hh7
-rw-r--r--include/qpdf/QPDFNameTreeObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFNumberTreeObjectHelper.hh2
-rw-r--r--include/qpdf/QPDFObjGen.hh4
-rw-r--r--include/qpdf/QPDFObjectHandle.hh8
-rw-r--r--include/qpdf/QPDFOutlineDocumentHelper.hh2
-rw-r--r--include/qpdf/QPDFOutlineObjectHelper.hh4
-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
36 files changed, 141 insertions, 218 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/InputSource.hh b/include/qpdf/InputSource.hh
index 2bc57c57..c1785a25 100644
--- a/include/qpdf/InputSource.hh
+++ b/include/qpdf/InputSource.hh
@@ -33,8 +33,7 @@ class QPDF_DLL_CLASS InputSource
{
public:
QPDF_DLL
- InputSource() :
- last_offset(0)
+ InputSource()
{
}
QPDF_DLL
@@ -86,7 +85,7 @@ class QPDF_DLL_CLASS InputSource
inline void loadBuffer();
protected:
- qpdf_offset_t last_offset;
+ qpdf_offset_t last_offset{0};
private:
class QPDF_DLL_PRIVATE Members
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 152421ad..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;
@@ -1150,58 +1150,32 @@ class QPDF
// PDF 1.4: Table F.4
struct HPageOffsetEntry
{
- HPageOffsetEntry() :
- delta_nobjects(0),
- delta_page_length(0),
- nshared_objects(0),
- delta_content_offset(0),
- delta_content_length(0)
- {
- }
-
- int delta_nobjects; // 1
- qpdf_offset_t delta_page_length; // 2
- int nshared_objects; // 3
+ int delta_nobjects{0}; // 1
+ qpdf_offset_t delta_page_length{0}; // 2
// vectors' sizes = nshared_objects
- std::vector<int> shared_identifiers; // 4
- std::vector<int> shared_numerators; // 5
- qpdf_offset_t delta_content_offset; // 6
- qpdf_offset_t delta_content_length; // 7
+ int nshared_objects{0}; // 3
+ std::vector<int> shared_identifiers; // 4
+ std::vector<int> shared_numerators; // 5
+ qpdf_offset_t delta_content_offset{0}; // 6
+ qpdf_offset_t delta_content_length{0}; // 7
};
// PDF 1.4: Table F.3
struct HPageOffset
{
- HPageOffset() :
- min_nobjects(0),
- first_page_offset(0),
- nbits_delta_nobjects(0),
- min_page_length(0),
- nbits_delta_page_length(0),
- min_content_offset(0),
- nbits_delta_content_offset(0),
- min_content_length(0),
- nbits_delta_content_length(0),
- nbits_nshared_objects(0),
- nbits_shared_identifier(0),
- nbits_shared_numerator(0),
- shared_denominator(0)
- {
- }
-
- int min_nobjects; // 1
- qpdf_offset_t first_page_offset; // 2
- int nbits_delta_nobjects; // 3
- int min_page_length; // 4
- int nbits_delta_page_length; // 5
- int min_content_offset; // 6
- int nbits_delta_content_offset; // 7
- int min_content_length; // 8
- int nbits_delta_content_length; // 9
- int nbits_nshared_objects; // 10
- int nbits_shared_identifier; // 11
- int nbits_shared_numerator; // 12
- int shared_denominator; // 13
+ int min_nobjects{0}; // 1
+ qpdf_offset_t first_page_offset{0}; // 2
+ int nbits_delta_nobjects{0}; // 3
+ int min_page_length{0}; // 4
+ int nbits_delta_page_length{0}; // 5
+ int min_content_offset{0}; // 6
+ int nbits_delta_content_offset{0}; // 7
+ int min_content_length{0}; // 8
+ int nbits_delta_content_length{0}; // 9
+ int nbits_nshared_objects{0}; // 10
+ int nbits_shared_identifier{0}; // 11
+ int nbits_shared_numerator{0}; // 12
+ int shared_denominator{0}; // 13
// vector size is npages
std::vector<HPageOffsetEntry> entries;
};
@@ -1209,40 +1183,22 @@ class QPDF
// PDF 1.4: Table F.6
struct HSharedObjectEntry
{
- HSharedObjectEntry() :
- delta_group_length(0),
- signature_present(0),
- nobjects_minus_one(0)
- {
- }
-
// Item 3 is a 128-bit signature (unsupported by Acrobat)
- int delta_group_length; // 1
- int signature_present; // 2 -- always 0
- int nobjects_minus_one; // 4 -- always 0
+ int delta_group_length{0}; // 1
+ int signature_present{0}; // 2 -- always 0
+ int nobjects_minus_one{0}; // 4 -- always 0
};
// PDF 1.4: Table F.5
struct HSharedObject
{
- HSharedObject() :
- first_shared_obj(0),
- first_shared_offset(0),
- nshared_first_page(0),
- nshared_total(0),
- nbits_nobjects(0),
- min_group_length(0),
- nbits_delta_group_length(0)
- {
- }
-
- int first_shared_obj; // 1
- qpdf_offset_t first_shared_offset; // 2
- int nshared_first_page; // 3
- int nshared_total; // 4
- int nbits_nobjects; // 5
- int min_group_length; // 6
- int nbits_delta_group_length; // 7
+ int first_shared_obj{0}; // 1
+ qpdf_offset_t first_shared_offset{0}; // 2
+ int nshared_first_page{0}; // 3
+ int nshared_total{0}; // 4
+ int nbits_nobjects{0}; // 5
+ int min_group_length{0}; // 6
+ int nbits_delta_group_length{0}; // 7
// vector size is nshared_total
std::vector<HSharedObjectEntry> entries;
};
@@ -1250,18 +1206,10 @@ class QPDF
// PDF 1.4: Table F.9
struct HGeneric
{
- HGeneric() :
- first_object(0),
- first_object_offset(0),
- nobjects(0),
- group_length(0)
- {
- }
-
- int first_object; // 1
- qpdf_offset_t first_object_offset; // 2
- int nobjects; // 3
- int group_length; // 4
+ int first_object{0}; // 1
+ qpdf_offset_t first_object_offset{0}; // 2
+ int nobjects{0}; // 3
+ int group_length{0}; // 4
};
// Other linearization data structures
@@ -1269,26 +1217,14 @@ class QPDF
// Initialized from Linearization Parameter dictionary
struct LinParameters
{
- LinParameters() :
- file_size(0),
- first_page_object(0),
- first_page_end(0),
- npages(0),
- xref_zero_offset(0),
- first_page(0),
- H_offset(0),
- H_length(0)
- {
- }
-
- qpdf_offset_t file_size; // /L
- int first_page_object; // /O
- qpdf_offset_t first_page_end; // /E
- int npages; // /N
- qpdf_offset_t xref_zero_offset; // /T
- int first_page; // /P
- qpdf_offset_t H_offset; // offset of primary hint stream
- qpdf_offset_t H_length; // length of primary hint stream
+ qpdf_offset_t file_size{0}; // /L
+ int first_page_object{0}; // /O
+ qpdf_offset_t first_page_end{0}; // /E
+ int npages{0}; // /N
+ qpdf_offset_t xref_zero_offset{0}; // /T
+ int first_page{0}; // /P
+ qpdf_offset_t H_offset{0}; // offset of primary hint stream
+ qpdf_offset_t H_length{0}; // length of primary hint stream
};
// Computed hint table value data structures. These tables contain the computed values on which
@@ -1304,14 +1240,8 @@ class QPDF
struct CHPageOffsetEntry
{
- CHPageOffsetEntry() :
- nobjects(0),
- nshared_objects(0)
- {
- }
-
- int nobjects;
- int nshared_objects;
+ int nobjects{0};
+ int nshared_objects{0};
// vectors' sizes = nshared_objects
std::vector<int> shared_identifiers;
};
@@ -1335,16 +1265,9 @@ class QPDF
// PDF 1.4: Table F.5
struct CHSharedObject
{
- CHSharedObject() :
- first_shared_obj(0),
- nshared_first_page(0),
- nshared_total(0)
- {
- }
-
- int first_shared_obj;
- int nshared_first_page;
- int nshared_total;
+ int first_shared_obj{0};
+ int nshared_first_page{0};
+ int nshared_total{0};
// vector size is nshared_total
std::vector<CHSharedObjectEntry> entries;
};
@@ -1385,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/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 37067108..b9c8ba50 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -145,11 +145,6 @@ class QPDFJob
struct AddAttachment
{
- AddAttachment() :
- replace(false)
- {
- }
-
std::string path;
std::string key;
std::string filename;
@@ -157,7 +152,7 @@ class QPDFJob
std::string moddate;
std::string mimetype;
std::string description;
- bool replace;
+ bool replace{false};
};
struct PageSpec
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/QPDFObjGen.hh b/include/qpdf/QPDFObjGen.hh
index 0f22b481..60c397e4 100644
--- a/include/qpdf/QPDFObjGen.hh
+++ b/include/qpdf/QPDFObjGen.hh
@@ -34,9 +34,7 @@ class QPDFObjGen
public:
// ABI: change to default.
QPDF_DLL
- QPDFObjGen() :
- obj(0),
- gen(0)
+ QPDFObjGen()
{
}
QPDF_DLL
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index 45ad1079..03262b40 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -290,6 +290,14 @@ class QPDFObjectHandle
QPDFObjectHandle(QPDFObjectHandle const&) = default;
QPDF_DLL
QPDFObjectHandle& operator=(QPDFObjectHandle const&) = default;
+
+#ifdef QPDF_FUTURE
+ QPDF_DLL
+ QPDFObjectHandle(QPDFObjectHandle&&) = default;
+ QPDF_DLL
+ QPDFObjectHandle& operator=(QPDFObjectHandle&&) = default;
+#endif
+
QPDF_DLL
inline bool isInitialized() const;
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 289941fa..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.
@@ -81,7 +81,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper
static QPDFOutlineObjectHelper
create(QPDFObjectHandle oh, QPDFOutlineDocumentHelper& dh, int depth)
{
- return QPDFOutlineObjectHelper(oh, dh, depth);
+ return {oh, dh, depth};
}
};
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;