2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Use = default and = delete where possible in classes

This commit is contained in:
Jay Berkenbilt 2022-04-15 19:44:07 -04:00
parent 2a7d2b63c2
commit cdd0b4fb7d
144 changed files with 196 additions and 591 deletions

View File

@ -165,6 +165,18 @@ CODING RULES
or QPDFDocumentHelper subclasses since there's no reason to use or QPDFDocumentHelper subclasses since there's no reason to use
dynamic_cast with those. dynamic_cast with those.
IMPORTANT NOTE ABOUT QPDF_DLL_CLASS: On mingw, the vtable for a
class with some virtual methods and no pure virtual methods seems
often (always?) not to be generated if the destructor is inline or
declared with `= default`. Therefore, for any class that is intended
to be used as a base class and doesn't contain any pure virtual
methods, you must declare the destructor in the header without
`= default` and provide a non-inline implementation in the source
file. Add this comment to the implementation:
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
* Put private member variables in std::shared_ptr<Members> for all * Put private member variables in std::shared_ptr<Members> for all
public classes. Remember to use QPDF_DLL on ~Members(). Exception: public classes. Remember to use QPDF_DLL on ~Members(). Exception:
indirection through std::shared_ptr<Members> is expensive, so don't indirection through std::shared_ptr<Members> is expensive, so don't

4
TODO
View File

@ -483,14 +483,10 @@ Comments appear in the code prefixed by "ABI"
* Switch default --json to latest * Switch default --json to latest
* See where anonymous namespaces can be used to keep things private to * See where anonymous namespaces can be used to keep things private to
a source file. Search for `(class|struct)` in **/*.cc. a source file. Search for `(class|struct)` in **/*.cc.
* See if we can use constructor delegation instead of init() in
classes with overloaded constructors.
* After removing legacy QPDFNameTreeObjectHelper and * After removing legacy QPDFNameTreeObjectHelper and
QPDFNumberTreeObjectHelper constructors, NNTreeImpl can switch to QPDFNumberTreeObjectHelper constructors, NNTreeImpl can switch to
having a QPDF reference and assume that the reference is always having a QPDF reference and assume that the reference is always
valid. valid.
* Use `= delete` and `= default` for constructors and destructors
where possible
* Having QPDFObjectHandle setters return Class& to allow for * Having QPDFObjectHandle setters return Class& to allow for
use of fluent interfaces. This includes array and dictionary use of fluent interfaces. This includes array and dictionary
mutators. mutators.

View File

@ -32,9 +32,7 @@ class StringCounter: public QPDFObjectHandle::TokenFilter
count(0) count(0)
{ {
} }
virtual ~StringCounter() virtual ~StringCounter() = default;
{
}
virtual void handleToken(QPDFTokenizer::Token const&); virtual void handleToken(QPDFTokenizer::Token const&);
virtual void handleEOF(); virtual void handleEOF();
int getCount() const; int getCount() const;

View File

@ -28,7 +28,7 @@ class ImageProvider: public QPDFObjectHandle::StreamDataProvider
{ {
public: public:
ImageProvider(std::string const& color_space, std::string const& filter); ImageProvider(std::string const& color_space, std::string const& filter);
virtual ~ImageProvider(); virtual ~ImageProvider() = default;
virtual void virtual void
provideStreamData(int objid, int generation, Pipeline* pipeline); provideStreamData(int objid, int generation, Pipeline* pipeline);
size_t getWidth() const; size_t getWidth() const;
@ -80,10 +80,6 @@ ImageProvider::ImageProvider(
} }
} }
ImageProvider::~ImageProvider()
{
}
size_t size_t
ImageProvider::getWidth() const ImageProvider::getWidth() const
{ {

View File

@ -35,9 +35,7 @@ usage()
class StringReverser: public QPDFObjectHandle::TokenFilter class StringReverser: public QPDFObjectHandle::TokenFilter
{ {
public: public:
virtual ~StringReverser() virtual ~StringReverser() = default;
{
}
virtual void handleToken(QPDFTokenizer::Token const&); virtual void handleToken(QPDFTokenizer::Token const&);
}; };
@ -70,9 +68,7 @@ StringReverser::handleToken(QPDFTokenizer::Token const& token)
class ColorToGray: public QPDFObjectHandle::TokenFilter class ColorToGray: public QPDFObjectHandle::TokenFilter
{ {
public: public:
virtual ~ColorToGray() virtual ~ColorToGray() = default;
{
}
virtual void handleToken(QPDFTokenizer::Token const&); virtual void handleToken(QPDFTokenizer::Token const&);
virtual void handleEOF(); virtual void handleEOF();

View File

@ -33,9 +33,7 @@ usage()
class ImageInverter: public QPDFObjectHandle::StreamDataProvider class ImageInverter: public QPDFObjectHandle::StreamDataProvider
{ {
public: public:
virtual ~ImageInverter() virtual ~ImageInverter() = default;
{
}
virtual void virtual void
provideStreamData(int objid, int generation, Pipeline* pipeline) override; provideStreamData(int objid, int generation, Pipeline* pipeline) override;

View File

@ -23,10 +23,7 @@ usage()
class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks class ParserCallbacks: public QPDFObjectHandle::ParserCallbacks
{ {
public: public:
virtual ~ParserCallbacks() virtual ~ParserCallbacks() = default;
{
}
virtual void contentSize(size_t); virtual void contentSize(size_t);
virtual void handleObject(QPDFObjectHandle, size_t offset, size_t length); virtual void handleObject(QPDFObjectHandle, size_t offset, size_t length);
virtual void handleEOF(); virtual void handleEOF();

View File

@ -14,9 +14,7 @@
class DiscardContents: public QPDFObjectHandle::ParserCallbacks class DiscardContents: public QPDFObjectHandle::ParserCallbacks
{ {
public: public:
virtual ~DiscardContents() virtual ~DiscardContents() = default;
{
}
virtual void virtual void
handleObject(QPDFObjectHandle) handleObject(QPDFObjectHandle)
{ {

View File

@ -66,7 +66,7 @@ class Buffer
private: private:
Members(size_t size, unsigned char* buf, bool own_memory); Members(size_t size, unsigned char* buf, bool own_memory);
Members(Members const&); Members(Members const&) = delete;
bool own_memory; bool own_memory;
size_t size; size_t size;

View File

@ -60,11 +60,11 @@ class QPDF_DLL_CLASS BufferInputSource: public InputSource
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(bool own_memory, std::string const& description, Buffer* buf); Members(bool own_memory, std::string const& description, Buffer* buf);
Members(Members const&); Members(Members const&) = delete;
bool own_memory; bool own_memory;
std::string description; std::string description;

View File

@ -79,7 +79,7 @@ class QPDF_DLL_CLASS ClosedFileInputSource: public InputSource
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(char const* filename); Members(char const* filename);

View File

@ -64,7 +64,7 @@ class QPDF_DLL_CLASS FileInputSource: public InputSource
private: private:
Members(bool close_file); Members(bool close_file);
Members(Members const&); Members(Members const&) = delete;
bool close_file; bool close_file;
std::string filename; std::string filename;

View File

@ -42,20 +42,13 @@ class QPDF_DLL_CLASS InputSource
{ {
} }
QPDF_DLL QPDF_DLL
virtual ~InputSource() virtual ~InputSource() = default;
{
}
class QPDF_DLL_CLASS Finder class QPDF_DLL_CLASS Finder
{ {
public: public:
Finder() Finder() = default;
{ virtual ~Finder() = default;
}
virtual ~Finder()
{
}
virtual bool check() = 0; virtual bool check() = 0;
}; };
@ -110,11 +103,11 @@ class QPDF_DLL_CLASS InputSource
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -150,25 +150,25 @@ class JSON
struct JSON_value struct JSON_value
{ {
virtual ~JSON_value(); virtual ~JSON_value() = default;
virtual std::string unparse(size_t depth) const = 0; virtual std::string unparse(size_t depth) const = 0;
}; };
struct JSON_dictionary: public JSON_value struct JSON_dictionary: public JSON_value
{ {
virtual ~JSON_dictionary(); virtual ~JSON_dictionary() = default;
virtual std::string unparse(size_t depth) const; virtual std::string unparse(size_t depth) const;
std::map<std::string, std::shared_ptr<JSON_value>> members; std::map<std::string, std::shared_ptr<JSON_value>> members;
}; };
struct JSON_array: public JSON_value struct JSON_array: public JSON_value
{ {
virtual ~JSON_array(); virtual ~JSON_array() = default;
virtual std::string unparse(size_t depth) const; virtual std::string unparse(size_t depth) const;
std::vector<std::shared_ptr<JSON_value>> elements; std::vector<std::shared_ptr<JSON_value>> elements;
}; };
struct JSON_string: public JSON_value struct JSON_string: public JSON_value
{ {
JSON_string(std::string const& utf8); JSON_string(std::string const& utf8);
virtual ~JSON_string(); virtual ~JSON_string() = default;
virtual std::string unparse(size_t depth) const; virtual std::string unparse(size_t depth) const;
std::string utf8; std::string utf8;
std::string encoded; std::string encoded;
@ -178,20 +178,20 @@ class JSON
JSON_number(long long val); JSON_number(long long val);
JSON_number(double val); JSON_number(double val);
JSON_number(std::string const& val); JSON_number(std::string const& val);
virtual ~JSON_number(); virtual ~JSON_number() = default;
virtual std::string unparse(size_t depth) const; virtual std::string unparse(size_t depth) const;
std::string encoded; std::string encoded;
}; };
struct JSON_bool: public JSON_value struct JSON_bool: public JSON_value
{ {
JSON_bool(bool val); JSON_bool(bool val);
virtual ~JSON_bool(); virtual ~JSON_bool() = default;
virtual std::string unparse(size_t depth) const; virtual std::string unparse(size_t depth) const;
bool value; bool value;
}; };
struct JSON_null: public JSON_value struct JSON_null: public JSON_value
{ {
virtual ~JSON_null(); virtual ~JSON_null() = default;
virtual std::string unparse(size_t depth) const; virtual std::string unparse(size_t depth) const;
}; };
@ -210,11 +210,11 @@ class JSON
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(std::shared_ptr<JSON_value>); Members(std::shared_ptr<JSON_value>);
Members(Members const&); Members(Members const&) = delete;
std::shared_ptr<JSON_value> value; std::shared_ptr<JSON_value> value;
}; };

View File

@ -59,7 +59,7 @@ class QPDF_DLL_CLASS Pipeline
Pipeline(char const* identifier, Pipeline* next); Pipeline(char const* identifier, Pipeline* next);
QPDF_DLL QPDF_DLL
virtual ~Pipeline(); virtual ~Pipeline() = default;
// Subclasses should implement write and finish to do their jobs // Subclasses should implement write and finish to do their jobs
// and then, if they are not end-of-line pipelines, call // and then, if they are not end-of-line pipelines, call

View File

@ -77,11 +77,11 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members();
Members(Members const&); Members(Members const&) = delete;
bool ready; bool ready;
std::shared_ptr<Buffer> data; std::shared_ptr<Buffer> data;

View File

@ -56,11 +56,11 @@ class QPDF_DLL_CLASS Pl_Concatenate: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -54,11 +54,11 @@ class QPDF_DLL_CLASS Pl_Count: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members();
Members(Members const&); Members(Members const&) = delete;
// Must be qpdf_offset_t, not size_t, to handle writing more than // Must be qpdf_offset_t, not size_t, to handle writing more than
// size_t can handle. // size_t can handle.

View File

@ -41,12 +41,8 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline
class QPDF_DLL_CLASS CompressConfig class QPDF_DLL_CLASS CompressConfig
{ {
public: public:
CompressConfig() CompressConfig() = default;
{ virtual ~CompressConfig() = default;
}
virtual ~CompressConfig()
{
}
virtual void apply(jpeg_compress_struct*) = 0; virtual void apply(jpeg_compress_struct*) = 0;
}; };
@ -83,7 +79,7 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members( Members(
@ -94,7 +90,7 @@ class QPDF_DLL_CLASS Pl_DCT: public Pipeline
int components = 1, int components = 1,
J_COLOR_SPACE color_space = JCS_GRAYSCALE, J_COLOR_SPACE color_space = JCS_GRAYSCALE,
CompressConfig* config_callback = 0); CompressConfig* config_callback = 0);
Members(Members const&); Members(Members const&) = delete;
action_e action; action_e action;
Pl_Buffer buf; Pl_Buffer buf;

View File

@ -49,11 +49,11 @@ class QPDF_DLL_CLASS Pl_Discard: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -80,7 +80,7 @@ class QPDF_DLL_CLASS Pl_Flate: public Pipeline
private: private:
Members(size_t out_bufsize, action_e action); Members(size_t out_bufsize, action_e action);
Members(Members const&); Members(Members const&) = delete;
std::shared_ptr<unsigned char> outbuf; std::shared_ptr<unsigned char> outbuf;
size_t out_bufsize; size_t out_bufsize;

View File

@ -66,11 +66,11 @@ class QPDF_DLL_CLASS Pl_QPDFTokenizer: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members();
Members(Members const&); Members(Members const&) = delete;
QPDFObjectHandle::TokenFilter* filter; QPDFObjectHandle::TokenFilter* filter;
QPDFTokenizer tokenizer; QPDFTokenizer tokenizer;

View File

@ -55,11 +55,11 @@ class QPDF_DLL_CLASS Pl_RunLength: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(action_e); Members(action_e);
Members(Members const&); Members(Members const&) = delete;
action_e action; action_e action;
state_e state; state_e state;

View File

@ -54,11 +54,11 @@ class QPDF_DLL_CLASS Pl_StdioFile: public Pipeline
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(FILE*); Members(FILE*);
Members(Members const&); Members(Members const&) = delete;
FILE* file; FILE* file;
}; };

View File

@ -913,9 +913,7 @@ class QPDF
{ {
public: public:
CopiedStreamDataProvider(QPDF& destination_qpdf); CopiedStreamDataProvider(QPDF& destination_qpdf);
virtual ~CopiedStreamDataProvider() virtual ~CopiedStreamDataProvider() = default;
{
}
virtual bool provideStreamData( virtual bool provideStreamData(
int objid, int objid,
int generation, int generation,
@ -940,9 +938,7 @@ class QPDF
public: public:
StringDecrypter(QPDF* qpdf, int objid, int gen); StringDecrypter(QPDF* qpdf, int objid, int gen);
virtual ~StringDecrypter() virtual ~StringDecrypter() = default;
{
}
virtual void decryptString(std::string& val); virtual void decryptString(std::string& val);
private: private:
@ -1381,9 +1377,7 @@ class QPDF
checker(checker) checker(checker)
{ {
} }
virtual ~PatternFinder() virtual ~PatternFinder() = default;
{
}
virtual bool virtual bool
check() check()
{ {
@ -1509,11 +1503,11 @@ class QPDF
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members();
Members(Members const&); Members(Members const&) = delete;
unsigned long long unique_id; unsigned long long unique_id;
QPDFTokenizer tokenizer; QPDFTokenizer tokenizer;

View File

@ -85,9 +85,7 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper
QPDF_DLL QPDF_DLL
QPDFAcroFormDocumentHelper(QPDF&); QPDFAcroFormDocumentHelper(QPDF&);
QPDF_DLL QPDF_DLL
virtual ~QPDFAcroFormDocumentHelper() virtual ~QPDFAcroFormDocumentHelper() = default;
{
}
// This class lazily creates an internal cache of the mapping // This class lazily creates an internal cache of the mapping
// among form fields, annotations, and pages. Methods within this // among form fields, annotations, and pages. Methods within this
@ -291,11 +289,11 @@ class QPDFAcroFormDocumentHelper: public QPDFDocumentHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members();
Members(Members const&); Members(Members const&) = delete;
bool cache_valid; bool cache_valid;
std::map<QPDFObjGen, std::vector<QPDFAnnotationObjectHelper>> std::map<QPDFObjGen, std::vector<QPDFAnnotationObjectHelper>>

View File

@ -33,9 +33,7 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper
QPDF_DLL QPDF_DLL
QPDFAnnotationObjectHelper(QPDFObjectHandle); QPDFAnnotationObjectHelper(QPDFObjectHandle);
QPDF_DLL QPDF_DLL
virtual ~QPDFAnnotationObjectHelper() virtual ~QPDFAnnotationObjectHelper() = default;
{
}
// This class provides helper methods for annotations. More // This class provides helper methods for annotations. More
// functionality will likely be added in the future. // functionality will likely be added in the future.
@ -108,11 +106,11 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -45,9 +45,7 @@ class QPDFDocumentHelper
{ {
} }
QPDF_DLL QPDF_DLL
virtual ~QPDFDocumentHelper() virtual ~QPDFDocumentHelper() = default;
{
}
QPDF_DLL QPDF_DLL
QPDF& QPDF&
getQPDF() getQPDF()

View File

@ -112,7 +112,7 @@ class QPDFEFStreamObjectHelper: public QPDFObjectHelper
~Members() = default; ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&) = delete; Members(Members const&) = delete;
}; };

View File

@ -85,7 +85,7 @@ class QPDFEmbeddedFileDocumentHelper: public QPDFDocumentHelper
~Members() = default; ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&) = delete; Members(Members const&) = delete;
std::shared_ptr<QPDFNameTreeObjectHelper> embedded_files; std::shared_ptr<QPDFNameTreeObjectHelper> embedded_files;

View File

@ -40,9 +40,7 @@ class QPDF_DLL_CLASS QPDFExc: public std::runtime_error
qpdf_offset_t offset, qpdf_offset_t offset,
std::string const& message); std::string const& message);
QPDF_DLL QPDF_DLL
virtual ~QPDFExc() noexcept virtual ~QPDFExc() noexcept = default;
{
}
// To get a complete error string, call what(), provided by // To get a complete error string, call what(), provided by
// std::exception. The accessors below return the original values // std::exception. The accessors below return the original values

View File

@ -109,7 +109,7 @@ class QPDFFileSpecObjectHelper: public QPDFObjectHelper
~Members() = default; ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&) = delete; Members(Members const&) = delete;
}; };

View File

@ -41,9 +41,7 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper
QPDF_DLL QPDF_DLL
QPDFFormFieldObjectHelper(QPDFObjectHandle); QPDFFormFieldObjectHelper(QPDFObjectHandle);
QPDF_DLL QPDF_DLL
virtual ~QPDFFormFieldObjectHelper() virtual ~QPDFFormFieldObjectHelper() = default;
{
}
QPDF_DLL QPDF_DLL
bool isNull(); bool isNull();
@ -229,11 +227,11 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -62,7 +62,7 @@ class QPDFNameTreeObjectHelper: public QPDFObjectHelper
static QPDFNameTreeObjectHelper newEmpty(QPDF&, bool auto_repair = true); static QPDFNameTreeObjectHelper newEmpty(QPDF&, bool auto_repair = true);
QPDF_DLL QPDF_DLL
virtual ~QPDFNameTreeObjectHelper(); virtual ~QPDFNameTreeObjectHelper() = default;
// Return whether the number tree has an explicit entry for this // Return whether the number tree has an explicit entry for this
// number. // number.
@ -194,7 +194,7 @@ class QPDFNameTreeObjectHelper: public QPDFObjectHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(QPDFObjectHandle& oh, QPDF*, bool auto_repair); Members(QPDFObjectHandle& oh, QPDF*, bool auto_repair);

View File

@ -55,11 +55,8 @@ class QPDFNumberTreeObjectHelper: public QPDFObjectHelper
[[deprecated("use constructor that takes QPDF&")]] QPDF_DLL [[deprecated("use constructor that takes QPDF&")]] QPDF_DLL
QPDFNumberTreeObjectHelper(QPDFObjectHandle); QPDFNumberTreeObjectHelper(QPDFObjectHandle);
// ABI: = default
QPDF_DLL QPDF_DLL
virtual ~QPDFNumberTreeObjectHelper() virtual ~QPDFNumberTreeObjectHelper() = default;
{
}
// Create an empty number tree // Create an empty number tree
QPDF_DLL QPDF_DLL
@ -217,7 +214,7 @@ class QPDFNumberTreeObjectHelper: public QPDFObjectHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(QPDFObjectHandle& oh, QPDF*, bool auto_repair); Members(QPDFObjectHandle& oh, QPDF*, bool auto_repair);

View File

@ -62,9 +62,7 @@ class QPDFObject
static constexpr object_type_e ot_operator = ::ot_operator; static constexpr object_type_e ot_operator = ::ot_operator;
static constexpr object_type_e ot_inlineimage = ::ot_inlineimage; static constexpr object_type_e ot_inlineimage = ::ot_inlineimage;
virtual ~QPDFObject() virtual ~QPDFObject() = default;
{
}
virtual std::string unparse() = 0; virtual std::string unparse() = 0;
virtual JSON getJSON() = 0; virtual JSON getJSON() = 0;

View File

@ -64,9 +64,7 @@ class QPDFObjectHandle
StreamDataProvider(bool supports_retry = false); StreamDataProvider(bool supports_retry = false);
QPDF_DLL QPDF_DLL
virtual ~StreamDataProvider() virtual ~StreamDataProvider();
{
}
// The implementation of this function must write stream data // The implementation of this function must write stream data
// to the given pipeline. The stream data must conform to // to the given pipeline. The stream data must conform to
// whatever filters are explicitly associated with the stream. // whatever filters are explicitly associated with the stream.
@ -172,13 +170,9 @@ class QPDFObjectHandle
{ {
public: public:
QPDF_DLL QPDF_DLL
TokenFilter() TokenFilter() = default;
{
}
QPDF_DLL QPDF_DLL
virtual ~TokenFilter() virtual ~TokenFilter() = default;
{
}
virtual void handleToken(QPDFTokenizer::Token const&) = 0; virtual void handleToken(QPDFTokenizer::Token const&) = 0;
QPDF_DLL QPDF_DLL
virtual void handleEOF(); virtual void handleEOF();
@ -216,9 +210,7 @@ class QPDFObjectHandle
{ {
public: public:
QPDF_DLL QPDF_DLL
virtual ~StringDecrypter() virtual ~StringDecrypter() = default;
{
}
virtual void decryptString(std::string& val) = 0; virtual void decryptString(std::string& val) = 0;
}; };
@ -229,9 +221,7 @@ class QPDFObjectHandle
{ {
public: public:
QPDF_DLL QPDF_DLL
virtual ~ParserCallbacks() virtual ~ParserCallbacks() = default;
{
}
// One of the handleObject methods must be overridden. // One of the handleObject methods must be overridden.
QPDF_DLL QPDF_DLL
virtual void handleObject(QPDFObjectHandle); virtual void handleObject(QPDFObjectHandle);

View File

@ -46,9 +46,7 @@ class QPDFObjectHelper
{ {
} }
QPDF_DLL QPDF_DLL
virtual ~QPDFObjectHelper() virtual ~QPDFObjectHelper() = default;
{
}
QPDF_DLL QPDF_DLL
QPDFObjectHandle QPDFObjectHandle
getObjectHandle() getObjectHandle()

View File

@ -45,7 +45,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper
QPDF_DLL QPDF_DLL
QPDFOutlineDocumentHelper(QPDF&); QPDFOutlineDocumentHelper(QPDF&);
QPDF_DLL QPDF_DLL
virtual ~QPDFOutlineDocumentHelper(); virtual ~QPDFOutlineDocumentHelper() = default;
QPDF_DLL QPDF_DLL
bool hasOutlines(); bool hasOutlines();
@ -88,11 +88,11 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
std::vector<QPDFOutlineObjectHelper> outlines; std::vector<QPDFOutlineObjectHelper> outlines;
std::set<QPDFObjGen> seen; std::set<QPDFObjGen> seen;

View File

@ -105,11 +105,11 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(QPDFOutlineDocumentHelper& dh); Members(QPDFOutlineDocumentHelper& dh);
Members(Members const&); Members(Members const&) = delete;
QPDFOutlineDocumentHelper& dh; QPDFOutlineDocumentHelper& dh;
std::shared_ptr<QPDFOutlineObjectHelper> parent; std::shared_ptr<QPDFOutlineObjectHelper> parent;

View File

@ -40,9 +40,7 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper
QPDF_DLL QPDF_DLL
QPDFPageDocumentHelper(QPDF&); QPDFPageDocumentHelper(QPDF&);
QPDF_DLL QPDF_DLL
virtual ~QPDFPageDocumentHelper() virtual ~QPDFPageDocumentHelper() = default;
{
}
// Traverse page tree, and return all /Page objects wrapped in // Traverse page tree, and return all /Page objects wrapped in
// QPDFPageObjectHelper objects. Unlike with // QPDFPageObjectHelper objects. Unlike with
@ -144,11 +142,11 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -50,9 +50,7 @@ class QPDFPageLabelDocumentHelper: public QPDFDocumentHelper
QPDF_DLL QPDF_DLL
QPDFPageLabelDocumentHelper(QPDF&); QPDFPageLabelDocumentHelper(QPDF&);
QPDF_DLL QPDF_DLL
virtual ~QPDFPageLabelDocumentHelper() virtual ~QPDFPageLabelDocumentHelper() = default;
{
}
QPDF_DLL QPDF_DLL
bool hasPageLabels(); bool hasPageLabels();
@ -90,11 +88,11 @@ class QPDFPageLabelDocumentHelper: public QPDFDocumentHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
std::shared_ptr<QPDFNumberTreeObjectHelper> labels; std::shared_ptr<QPDFNumberTreeObjectHelper> labels;
}; };

View File

@ -43,9 +43,7 @@ class QPDFPageObjectHelper: public QPDFObjectHelper
QPDF_DLL QPDF_DLL
QPDFPageObjectHelper(QPDFObjectHandle); QPDFPageObjectHelper(QPDFObjectHandle);
QPDF_DLL QPDF_DLL
virtual ~QPDFPageObjectHelper() virtual ~QPDFPageObjectHelper() = default;
{
}
// Works with pages and form XObjects. Return the effective value // Works with pages and form XObjects. Return the effective value
// of this attribute for the page/form XObject. For pages, if the // of this attribute for the page/form XObject. For pages, if the
@ -384,11 +382,11 @@ class QPDFPageObjectHelper: public QPDFObjectHelper
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members() = default;
Members(Members const&); Members(Members const&) = delete;
}; };
std::shared_ptr<Members> m; std::shared_ptr<Members> m;

View File

@ -35,7 +35,7 @@ class QPDF_DLL_CLASS QPDFSystemError: public std::runtime_error
QPDF_DLL QPDF_DLL
QPDFSystemError(std::string const& description, int system_errno); QPDFSystemError(std::string const& description, int system_errno);
QPDF_DLL QPDF_DLL
virtual ~QPDFSystemError() noexcept; virtual ~QPDFSystemError() noexcept = default;
// To get a complete error string, call what(), provided by // To get a complete error string, call what(), provided by
// std::exception. The accessors below return the original values // std::exception. The accessors below return the original values

View File

@ -217,11 +217,11 @@ class QPDFTokenizer
public: public:
QPDF_DLL QPDF_DLL
~Members(); ~Members() = default;
private: private:
Members(); Members();
Members(Members const&); Members(Members const&) = delete;
void reset(); void reset();
// Lexer state // Lexer state

View File

@ -75,14 +75,12 @@ class QPDFWriter
QPDFWriter(QPDF& pdf, char const* description, FILE* file, bool close_file); QPDFWriter(QPDF& pdf, char const* description, FILE* file, bool close_file);
QPDF_DLL QPDF_DLL
~QPDFWriter(); ~QPDFWriter() = default;
class QPDF_DLL_CLASS ProgressReporter class QPDF_DLL_CLASS ProgressReporter
{ {
public: public:
virtual ~ProgressReporter() virtual ~ProgressReporter() = default;
{
}
// This method is called with a value from 0 to 100 to // This method is called with a value from 0 to 100 to
// indicate approximate progress through the write process. // indicate approximate progress through the write process.
@ -718,7 +716,7 @@ class QPDFWriter
private: private:
Members(QPDF& pdf); Members(QPDF& pdf);
Members(Members const&); Members(Members const&) = delete;
QPDF& pdf; QPDF& pdf;
char const* filename; char const* filename;

View File

@ -28,9 +28,7 @@
class QPDF_DLL_CLASS RandomDataProvider class QPDF_DLL_CLASS RandomDataProvider
{ {
public: public:
virtual ~RandomDataProvider() virtual ~RandomDataProvider() = default;
{
}
virtual void provideRandomData(unsigned char* data, size_t len) = 0; virtual void provideRandomData(unsigned char* data, size_t len) = 0;
protected: protected:

View File

@ -36,10 +36,6 @@ AES_PDF_native::AES_PDF_native(
} }
} }
AES_PDF_native::~AES_PDF_native()
{
}
void void
AES_PDF_native::update(unsigned char* in_data, unsigned char* out_data) AES_PDF_native::update(unsigned char* in_data, unsigned char* out_data)
{ {

View File

@ -17,10 +17,6 @@ BufferInputSource::Members::Members(
{ {
} }
BufferInputSource::Members::~Members()
{
}
BufferInputSource::BufferInputSource( BufferInputSource::BufferInputSource(
std::string const& description, Buffer* buf, bool own_memory) : std::string const& description, Buffer* buf, bool own_memory) :
m(new Members(own_memory, description, buf)) m(new Members(own_memory, description, buf))

View File

@ -9,10 +9,6 @@ ClosedFileInputSource::Members::Members(char const* filename) :
{ {
} }
ClosedFileInputSource::Members::~Members()
{
}
ClosedFileInputSource::ClosedFileInputSource(char const* filename) : ClosedFileInputSource::ClosedFileInputSource(char const* filename) :
m(new Members(filename)) m(new Members(filename))
{ {
@ -20,6 +16,8 @@ ClosedFileInputSource::ClosedFileInputSource(char const* filename) :
ClosedFileInputSource::~ClosedFileInputSource() ClosedFileInputSource::~ClosedFileInputSource()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -8,10 +8,6 @@ ContentNormalizer::ContentNormalizer() :
{ {
} }
ContentNormalizer::~ContentNormalizer()
{
}
void void
ContentNormalizer::handleToken(QPDFTokenizer::Token const& token) ContentNormalizer::handleToken(QPDFTokenizer::Token const& token)
{ {

View File

@ -2,14 +2,6 @@
#include <qpdf/QPDFCryptoProvider.hh> #include <qpdf/QPDFCryptoProvider.hh>
CryptoRandomDataProvider::CryptoRandomDataProvider()
{
}
CryptoRandomDataProvider::~CryptoRandomDataProvider()
{
}
void void
CryptoRandomDataProvider::provideRandomData(unsigned char* data, size_t len) CryptoRandomDataProvider::provideRandomData(unsigned char* data, size_t len)
{ {

View File

@ -42,6 +42,8 @@ FileInputSource::setFile(char const* description, FILE* filep, bool close_file)
FileInputSource::~FileInputSource() FileInputSource::~FileInputSource()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
qpdf_offset_t qpdf_offset_t

View File

@ -5,14 +5,6 @@
#include <stdexcept> #include <stdexcept>
#include <string.h> #include <string.h>
InputSource::Members::Members()
{
}
InputSource::Members::~Members()
{
}
void void
InputSource::setLastOffset(qpdf_offset_t offset) InputSource::setLastOffset(qpdf_offset_t offset)
{ {

View File

@ -9,10 +9,6 @@ InsecureRandomDataProvider::InsecureRandomDataProvider() :
{ {
} }
InsecureRandomDataProvider::~InsecureRandomDataProvider()
{
}
void void
InsecureRandomDataProvider::provideRandomData(unsigned char* data, size_t len) InsecureRandomDataProvider::provideRandomData(unsigned char* data, size_t len)
{ {

View File

@ -5,10 +5,6 @@
#include <cstring> #include <cstring>
#include <stdexcept> #include <stdexcept>
JSON::Members::~Members()
{
}
JSON::Members::Members(std::shared_ptr<JSON_value> value) : JSON::Members::Members(std::shared_ptr<JSON_value> value) :
value(value) value(value)
{ {
@ -19,14 +15,6 @@ JSON::JSON(std::shared_ptr<JSON_value> value) :
{ {
} }
JSON::JSON_value::~JSON_value()
{
}
JSON::JSON_dictionary::~JSON_dictionary()
{
}
std::string std::string
JSON::JSON_dictionary::unparse(size_t depth) const JSON::JSON_dictionary::unparse(size_t depth) const
{ {
@ -51,10 +39,6 @@ JSON::JSON_dictionary::unparse(size_t depth) const
return result; return result;
} }
JSON::JSON_array::~JSON_array()
{
}
std::string std::string
JSON::JSON_array::unparse(size_t depth) const JSON::JSON_array::unparse(size_t depth) const
{ {
@ -84,10 +68,6 @@ JSON::JSON_string::JSON_string(std::string const& utf8) :
{ {
} }
JSON::JSON_string::~JSON_string()
{
}
std::string std::string
JSON::JSON_string::unparse(size_t) const JSON::JSON_string::unparse(size_t) const
{ {
@ -109,10 +89,6 @@ JSON::JSON_number::JSON_number(std::string const& value) :
{ {
} }
JSON::JSON_number::~JSON_number()
{
}
std::string std::string
JSON::JSON_number::unparse(size_t) const JSON::JSON_number::unparse(size_t) const
{ {
@ -124,20 +100,12 @@ JSON::JSON_bool::JSON_bool(bool val) :
{ {
} }
JSON::JSON_bool::~JSON_bool()
{
}
std::string std::string
JSON::JSON_bool::unparse(size_t) const JSON::JSON_bool::unparse(size_t) const
{ {
return value ? "true" : "false"; return value ? "true" : "false";
} }
JSON::JSON_null::~JSON_null()
{
}
std::string std::string
JSON::JSON_null::unparse(size_t) const JSON::JSON_null::unparse(size_t) const
{ {

View File

@ -9,10 +9,6 @@ JSONHandler::JSONHandler() :
{ {
} }
JSONHandler::Members::Members()
{
}
void void
JSONHandler::usage(std::string const& msg) JSONHandler::usage(std::string const& msg)
{ {

View File

@ -17,10 +17,6 @@ OffsetInputSource::OffsetInputSource(
std::numeric_limits<qpdf_offset_t>::max() - global_offset; std::numeric_limits<qpdf_offset_t>::max() - global_offset;
} }
OffsetInputSource::~OffsetInputSource()
{
}
qpdf_offset_t qpdf_offset_t
OffsetInputSource::findAndSkipNextEOL() OffsetInputSource::findAndSkipNextEOL()
{ {

View File

@ -8,10 +8,6 @@ Pipeline::Pipeline(char const* identifier, Pipeline* next) :
{ {
} }
Pipeline::~Pipeline()
{
}
Pipeline* Pipeline*
Pipeline::getNext(bool allow_null) Pipeline::getNext(bool allow_null)
{ {

View File

@ -35,10 +35,6 @@ Pl_AES_PDF::Pl_AES_PDF(
std::memset(this->cbc_block, 0, this->buf_size); std::memset(this->cbc_block, 0, this->buf_size);
} }
Pl_AES_PDF::~Pl_AES_PDF()
{
}
void void
Pl_AES_PDF::useZeroIV() Pl_AES_PDF::useZeroIV()
{ {

View File

@ -12,10 +12,6 @@ Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) :
memset(this->inbuf, 117, 5); memset(this->inbuf, 117, 5);
} }
Pl_ASCII85Decoder::~Pl_ASCII85Decoder()
{
}
void void
Pl_ASCII85Decoder::write(unsigned char* buf, size_t len) Pl_ASCII85Decoder::write(unsigned char* buf, size_t len)
{ {

View File

@ -15,10 +15,6 @@ Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) :
this->inbuf[2] = '\0'; this->inbuf[2] = '\0';
} }
Pl_ASCIIHexDecoder::~Pl_ASCIIHexDecoder()
{
}
void void
Pl_ASCIIHexDecoder::write(unsigned char* buf, size_t len) Pl_ASCIIHexDecoder::write(unsigned char* buf, size_t len)
{ {

View File

@ -12,10 +12,6 @@ Pl_Buffer::Members::Members() :
{ {
} }
Pl_Buffer::Members::~Members()
{
}
Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) :
Pipeline(identifier, next), Pipeline(identifier, next),
m(new Members()) m(new Members())
@ -24,6 +20,8 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) :
Pl_Buffer::~Pl_Buffer() Pl_Buffer::~Pl_Buffer()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -1,13 +1,5 @@
#include <qpdf/Pl_Concatenate.hh> #include <qpdf/Pl_Concatenate.hh>
Pl_Concatenate::Members::Members()
{
}
Pl_Concatenate::Members::~Members()
{
}
Pl_Concatenate::Pl_Concatenate(char const* identifier, Pipeline* next) : Pl_Concatenate::Pl_Concatenate(char const* identifier, Pipeline* next) :
Pipeline(identifier, next) Pipeline(identifier, next)
{ {
@ -15,6 +7,8 @@ Pl_Concatenate::Pl_Concatenate(char const* identifier, Pipeline* next) :
Pl_Concatenate::~Pl_Concatenate() Pl_Concatenate::~Pl_Concatenate()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -8,10 +8,6 @@ Pl_Count::Members::Members() :
{ {
} }
Pl_Count::Members::~Members()
{
}
Pl_Count::Pl_Count(char const* identifier, Pipeline* next) : Pl_Count::Pl_Count(char const* identifier, Pipeline* next) :
Pipeline(identifier, next), Pipeline(identifier, next),
m(new Members()) m(new Members())
@ -20,6 +16,8 @@ Pl_Count::Pl_Count(char const* identifier, Pipeline* next) :
Pl_Count::~Pl_Count() Pl_Count::~Pl_Count()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -50,10 +50,6 @@ Pl_DCT::Members::Members(
{ {
} }
Pl_DCT::Members::~Members()
{
}
Pl_DCT::Pl_DCT(char const* identifier, Pipeline* next) : Pl_DCT::Pl_DCT(char const* identifier, Pipeline* next) :
Pipeline(identifier, next), Pipeline(identifier, next),
m(new Members(a_decompress, "DCT compressed image")) m(new Members(a_decompress, "DCT compressed image"))
@ -82,6 +78,8 @@ Pl_DCT::Pl_DCT(
Pl_DCT::~Pl_DCT() Pl_DCT::~Pl_DCT()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -2,14 +2,6 @@
// Exercised in md5 test suite // Exercised in md5 test suite
Pl_Discard::Members::Members()
{
}
Pl_Discard::Members::~Members()
{
}
Pl_Discard::Pl_Discard() : Pl_Discard::Pl_Discard() :
Pipeline("discard", 0) Pipeline("discard", 0)
{ {
@ -17,6 +9,8 @@ Pl_Discard::Pl_Discard() :
Pl_Discard::~Pl_Discard() Pl_Discard::~Pl_Discard()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -65,6 +65,8 @@ Pl_Flate::Pl_Flate(
Pl_Flate::~Pl_Flate() Pl_Flate::~Pl_Flate()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -22,10 +22,6 @@ Pl_LZWDecoder::Pl_LZWDecoder(
memset(buf, 0, 3); memset(buf, 0, 3);
} }
Pl_LZWDecoder::~Pl_LZWDecoder()
{
}
void void
Pl_LZWDecoder::write(unsigned char* bytes, size_t len) Pl_LZWDecoder::write(unsigned char* bytes, size_t len)
{ {

View File

@ -10,10 +10,6 @@ Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) :
{ {
} }
Pl_MD5::~Pl_MD5()
{
}
void void
Pl_MD5::write(unsigned char* buf, size_t len) Pl_MD5::write(unsigned char* buf, size_t len)
{ {

View File

@ -61,10 +61,6 @@ Pl_PNGFilter::Pl_PNGFilter(
(action == a_encode ? this->bytes_per_row : this->bytes_per_row + 1); (action == a_encode ? this->bytes_per_row : this->bytes_per_row + 1);
} }
Pl_PNGFilter::~Pl_PNGFilter()
{
}
void void
Pl_PNGFilter::write(unsigned char* data, size_t len) Pl_PNGFilter::write(unsigned char* data, size_t len)
{ {

View File

@ -12,10 +12,6 @@ Pl_QPDFTokenizer::Members::Members() :
{ {
} }
Pl_QPDFTokenizer::Members::~Members()
{
}
Pl_QPDFTokenizer::Pl_QPDFTokenizer( Pl_QPDFTokenizer::Pl_QPDFTokenizer(
char const* identifier, char const* identifier,
QPDFObjectHandle::TokenFilter* filter, QPDFObjectHandle::TokenFilter* filter,
@ -32,6 +28,8 @@ Pl_QPDFTokenizer::Pl_QPDFTokenizer(
Pl_QPDFTokenizer::~Pl_QPDFTokenizer() Pl_QPDFTokenizer::~Pl_QPDFTokenizer()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -15,10 +15,6 @@ Pl_RC4::Pl_RC4(
this->outbuf = QUtil::make_shared_array<unsigned char>(out_bufsize); this->outbuf = QUtil::make_shared_array<unsigned char>(out_bufsize);
} }
Pl_RC4::~Pl_RC4()
{
}
void void
Pl_RC4::write(unsigned char* data, size_t len) Pl_RC4::write(unsigned char* data, size_t len)
{ {

View File

@ -10,10 +10,6 @@ Pl_RunLength::Members::Members(action_e action) :
{ {
} }
Pl_RunLength::Members::~Members()
{
}
Pl_RunLength::Pl_RunLength( Pl_RunLength::Pl_RunLength(
char const* identifier, Pipeline* next, action_e action) : char const* identifier, Pipeline* next, action_e action) :
Pipeline(identifier, next), Pipeline(identifier, next),
@ -23,6 +19,8 @@ Pl_RunLength::Pl_RunLength(
Pl_RunLength::~Pl_RunLength() Pl_RunLength::~Pl_RunLength()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -14,10 +14,6 @@ Pl_SHA2::Pl_SHA2(int bits, Pipeline* next) :
} }
} }
Pl_SHA2::~Pl_SHA2()
{
}
void void
Pl_SHA2::write(unsigned char* buf, size_t len) Pl_SHA2::write(unsigned char* buf, size_t len)
{ {

View File

@ -11,10 +11,6 @@ Pl_StdioFile::Members::Members(FILE* f) :
{ {
} }
Pl_StdioFile::Members::~Members()
{
}
Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) : Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) :
Pipeline(identifier, 0), Pipeline(identifier, 0),
m(new Members(f)) m(new Members(f))
@ -23,6 +19,8 @@ Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) :
Pl_StdioFile::~Pl_StdioFile() Pl_StdioFile::~Pl_StdioFile()
{ {
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
} }
void void

View File

@ -45,10 +45,6 @@ Pl_TIFFPredictor::Pl_TIFFPredictor(
memset(this->cur_row.get(), 0, this->bytes_per_row); memset(this->cur_row.get(), 0, this->bytes_per_row);
} }
Pl_TIFFPredictor::~Pl_TIFFPredictor()
{
}
void void
Pl_TIFFPredictor::write(unsigned char* data, size_t len) Pl_TIFFPredictor::write(unsigned char* data, size_t len)
{ {

View File

@ -230,10 +230,6 @@ QPDF::Members::Members() :
{ {
} }
QPDF::Members::~Members()
{
}
QPDF::QPDF() : QPDF::QPDF() :
m(new Members()) m(new Members())
{ {

View File

@ -6,10 +6,6 @@
#include <qpdf/QUtil.hh> #include <qpdf/QUtil.hh>
#include <qpdf/ResourceFinder.hh> #include <qpdf/ResourceFinder.hh>
QPDFAcroFormDocumentHelper::Members::~Members()
{
}
QPDFAcroFormDocumentHelper::Members::Members() : QPDFAcroFormDocumentHelper::Members::Members() :
cache_valid(false) cache_valid(false)
{ {

View File

@ -6,14 +6,6 @@
#include <qpdf/QTC.hh> #include <qpdf/QTC.hh>
#include <qpdf/QUtil.hh> #include <qpdf/QUtil.hh>
QPDFAnnotationObjectHelper::Members::~Members()
{
}
QPDFAnnotationObjectHelper::Members::Members()
{
}
QPDFAnnotationObjectHelper::QPDFAnnotationObjectHelper(QPDFObjectHandle oh) : QPDFAnnotationObjectHelper::QPDFAnnotationObjectHelper(QPDFObjectHandle oh) :
QPDFObjectHelper(oh) QPDFObjectHelper(oh)
{ {

View File

@ -12,10 +12,6 @@ QPDFEFStreamObjectHelper::QPDFEFStreamObjectHelper(QPDFObjectHandle oh) :
{ {
} }
QPDFEFStreamObjectHelper::Members::Members()
{
}
QPDFObjectHandle QPDFObjectHandle
QPDFEFStreamObjectHelper::getParam(std::string const& pkey) QPDFEFStreamObjectHelper::getParam(std::string const& pkey)
{ {

View File

@ -47,10 +47,6 @@ QPDFEmbeddedFileDocumentHelper::QPDFEmbeddedFileDocumentHelper(QPDF& qpdf) :
} }
} }
QPDFEmbeddedFileDocumentHelper::Members::Members()
{
}
bool bool
QPDFEmbeddedFileDocumentHelper::hasEmbeddedFiles() const QPDFEmbeddedFileDocumentHelper::hasEmbeddedFiles() const
{ {

View File

@ -19,10 +19,6 @@ QPDFFileSpecObjectHelper::QPDFFileSpecObjectHelper(QPDFObjectHandle oh) :
} }
} }
QPDFFileSpecObjectHelper::Members::Members()
{
}
static std::vector<std::string> name_keys = { static std::vector<std::string> name_keys = {
"/UF", "/F", "/Unix", "/DOS", "/Mac"}; "/UF", "/F", "/Unix", "/DOS", "/Mac"};

View File

@ -8,14 +8,6 @@
#include <qpdf/QUtil.hh> #include <qpdf/QUtil.hh>
#include <stdlib.h> #include <stdlib.h>
QPDFFormFieldObjectHelper::Members::~Members()
{
}
QPDFFormFieldObjectHelper::Members::Members()
{
}
QPDFFormFieldObjectHelper::QPDFFormFieldObjectHelper(QPDFObjectHandle oh) : QPDFFormFieldObjectHelper::QPDFFormFieldObjectHelper(QPDFObjectHandle oh) :
QPDFObjectHelper(oh), QPDFObjectHelper(oh),
m(new Members()) m(new Members())
@ -525,9 +517,7 @@ class ValueSetter: public QPDFObjectHandle::TokenFilter
std::vector<std::string> const& opt, std::vector<std::string> const& opt,
double tf, double tf,
QPDFObjectHandle::Rectangle const& bbox); QPDFObjectHandle::Rectangle const& bbox);
virtual ~ValueSetter() virtual ~ValueSetter() = default;
{
}
virtual void handleToken(QPDFTokenizer::Token const&); virtual void handleToken(QPDFTokenizer::Token const&);
virtual void handleEOF(); virtual void handleEOF();
void writeAppearance(); void writeAppearance();

View File

@ -46,9 +46,7 @@ namespace
size_t oi_min_height, size_t oi_min_height,
size_t oi_min_area, size_t oi_min_area,
QPDFObjectHandle& image); QPDFObjectHandle& image);
virtual ~ImageOptimizer() virtual ~ImageOptimizer() = default;
{
}
virtual void virtual void
provideStreamData(int objid, int generation, Pipeline* pipeline); provideStreamData(int objid, int generation, Pipeline* pipeline);
std::shared_ptr<Pipeline> std::shared_ptr<Pipeline>
@ -66,9 +64,7 @@ namespace
class DiscardContents: public QPDFObjectHandle::ParserCallbacks class DiscardContents: public QPDFObjectHandle::ParserCallbacks
{ {
public: public:
virtual ~DiscardContents() virtual ~DiscardContents() = default;
{
}
virtual void virtual void
handleObject(QPDFObjectHandle) handleObject(QPDFObjectHandle)
{ {
@ -103,10 +99,7 @@ namespace
filename(filename) filename(filename)
{ {
} }
virtual ~ProgressReporter() virtual ~ProgressReporter() = default;
{
}
virtual void reportProgress(int); virtual void reportProgress(int);
private: private:

View File

@ -31,10 +31,6 @@ class NameTreeDetails: public NNTreeDetails
static NameTreeDetails name_tree_details; static NameTreeDetails name_tree_details;
QPDFNameTreeObjectHelper::Members::~Members()
{
}
QPDFNameTreeObjectHelper::Members::Members( QPDFNameTreeObjectHelper::Members::Members(
QPDFObjectHandle& oh, QPDF* q, bool auto_repair) : QPDFObjectHandle& oh, QPDF* q, bool auto_repair) :
impl(std::make_shared<NNTreeImpl>(name_tree_details, q, oh, auto_repair)) impl(std::make_shared<NNTreeImpl>(name_tree_details, q, oh, auto_repair))
@ -54,10 +50,6 @@ QPDFNameTreeObjectHelper::QPDFNameTreeObjectHelper(QPDFObjectHandle oh) :
{ {
} }
QPDFNameTreeObjectHelper::~QPDFNameTreeObjectHelper()
{
}
QPDFNameTreeObjectHelper QPDFNameTreeObjectHelper
QPDFNameTreeObjectHelper::newEmpty(QPDF& qpdf, bool auto_repair) QPDFNameTreeObjectHelper::newEmpty(QPDF& qpdf, bool auto_repair)
{ {

View File

@ -32,10 +32,6 @@ class NumberTreeDetails: public NNTreeDetails
static NumberTreeDetails number_tree_details; static NumberTreeDetails number_tree_details;
QPDFNumberTreeObjectHelper::Members::~Members()
{
}
QPDFNumberTreeObjectHelper::Members::Members( QPDFNumberTreeObjectHelper::Members::Members(
QPDFObjectHandle& oh, QPDF* q, bool auto_repair) : QPDFObjectHandle& oh, QPDF* q, bool auto_repair) :
impl(std::make_shared<NNTreeImpl>(number_tree_details, q, oh, auto_repair)) impl(std::make_shared<NNTreeImpl>(number_tree_details, q, oh, auto_repair))

View File

@ -41,6 +41,12 @@ QPDFObjectHandle::StreamDataProvider::StreamDataProvider(bool supports_retry) :
{ {
} }
QPDFObjectHandle::StreamDataProvider::~StreamDataProvider()
{
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
}
void void
QPDFObjectHandle::StreamDataProvider::provideStreamData( QPDFObjectHandle::StreamDataProvider::provideStreamData(
int objid, int generation, Pipeline* pipeline) int objid, int generation, Pipeline* pipeline)
@ -77,9 +83,7 @@ class CoalesceProvider: public QPDFObjectHandle::StreamDataProvider
old_contents(old_contents) old_contents(old_contents)
{ {
} }
virtual ~CoalesceProvider() virtual ~CoalesceProvider() = default;
{
}
virtual void virtual void
provideStreamData(int objid, int generation, Pipeline* pipeline); provideStreamData(int objid, int generation, Pipeline* pipeline);

View File

@ -2,14 +2,6 @@
#include <qpdf/QTC.hh> #include <qpdf/QTC.hh>
QPDFOutlineDocumentHelper::Members::~Members()
{
}
QPDFOutlineDocumentHelper::Members::Members()
{
}
QPDFOutlineDocumentHelper::QPDFOutlineDocumentHelper(QPDF& qpdf) : QPDFOutlineDocumentHelper::QPDFOutlineDocumentHelper(QPDF& qpdf) :
QPDFDocumentHelper(qpdf), QPDFDocumentHelper(qpdf),
m(new Members()) m(new Members())
@ -36,10 +28,6 @@ QPDFOutlineDocumentHelper::QPDFOutlineDocumentHelper(QPDF& qpdf) :
} }
} }
QPDFOutlineDocumentHelper::~QPDFOutlineDocumentHelper()
{
}
bool bool
QPDFOutlineDocumentHelper::hasOutlines() QPDFOutlineDocumentHelper::hasOutlines()
{ {

View File

@ -3,10 +3,6 @@
#include <qpdf/QPDFOutlineDocumentHelper.hh> #include <qpdf/QPDFOutlineDocumentHelper.hh>
#include <qpdf/QTC.hh> #include <qpdf/QTC.hh>
QPDFOutlineObjectHelper::Members::~Members()
{
}
QPDFOutlineObjectHelper::Members::Members(QPDFOutlineDocumentHelper& dh) : QPDFOutlineObjectHelper::Members::Members(QPDFOutlineDocumentHelper& dh) :
dh(dh) dh(dh)
{ {

View File

@ -4,14 +4,6 @@
#include <qpdf/QTC.hh> #include <qpdf/QTC.hh>
#include <qpdf/QUtil.hh> #include <qpdf/QUtil.hh>
QPDFPageDocumentHelper::Members::~Members()
{
}
QPDFPageDocumentHelper::Members::Members()
{
}
QPDFPageDocumentHelper::QPDFPageDocumentHelper(QPDF& qpdf) : QPDFPageDocumentHelper::QPDFPageDocumentHelper(QPDF& qpdf) :
QPDFDocumentHelper(qpdf) QPDFDocumentHelper(qpdf)
{ {

View File

@ -2,14 +2,6 @@
#include <qpdf/QTC.hh> #include <qpdf/QTC.hh>
QPDFPageLabelDocumentHelper::Members::~Members()
{
}
QPDFPageLabelDocumentHelper::Members::Members()
{
}
QPDFPageLabelDocumentHelper::QPDFPageLabelDocumentHelper(QPDF& qpdf) : QPDFPageLabelDocumentHelper::QPDFPageLabelDocumentHelper(QPDF& qpdf) :
QPDFDocumentHelper(qpdf), QPDFDocumentHelper(qpdf),
m(new Members()) m(new Members())

View File

@ -18,9 +18,7 @@ class ContentProvider: public QPDFObjectHandle::StreamDataProvider
from_page(from_page) from_page(from_page)
{ {
} }
virtual ~ContentProvider() virtual ~ContentProvider() = default;
{
}
virtual void virtual void
provideStreamData(int objid, int generation, Pipeline* pipeline); provideStreamData(int objid, int generation, Pipeline* pipeline);
@ -45,9 +43,7 @@ class InlineImageTracker: public QPDFObjectHandle::TokenFilter
{ {
public: public:
InlineImageTracker(QPDF*, size_t min_size, QPDFObjectHandle resources); InlineImageTracker(QPDF*, size_t min_size, QPDFObjectHandle resources);
virtual ~InlineImageTracker() virtual ~InlineImageTracker() = default;
{
}
virtual void handleToken(QPDFTokenizer::Token const&); virtual void handleToken(QPDFTokenizer::Token const&);
QPDFObjectHandle convertIIDict(QPDFObjectHandle odict); QPDFObjectHandle convertIIDict(QPDFObjectHandle odict);
@ -230,14 +226,6 @@ InlineImageTracker::handleToken(QPDFTokenizer::Token const& token)
} }
} }
QPDFPageObjectHelper::Members::~Members()
{
}
QPDFPageObjectHelper::Members::Members()
{
}
QPDFPageObjectHelper::QPDFPageObjectHelper(QPDFObjectHandle oh) : QPDFPageObjectHelper::QPDFPageObjectHelper(QPDFObjectHandle oh) :
QPDFObjectHelper(oh) QPDFObjectHelper(oh)
{ {

View File

@ -11,10 +11,6 @@ QPDFSystemError::QPDFSystemError(
{ {
} }
QPDFSystemError::~QPDFSystemError() noexcept
{
}
std::string std::string
QPDFSystemError::createWhat(std::string const& description, int system_errno) QPDFSystemError::createWhat(std::string const& description, int system_errno)
{ {

View File

@ -29,9 +29,7 @@ class QPDFWordTokenFinder: public InputSource::Finder
str(str) str(str)
{ {
} }
virtual ~QPDFWordTokenFinder() virtual ~QPDFWordTokenFinder() = default;
{
}
virtual bool check(); virtual bool check();
private: private:
@ -96,10 +94,6 @@ QPDFTokenizer::Members::reset()
last_char_was_cr = false; last_char_was_cr = false;
} }
QPDFTokenizer::Members::~Members()
{
}
QPDFTokenizer::Token::Token(token_type_e type, std::string const& value) : QPDFTokenizer::Token::Token(token_type_e type, std::string const& value) :
type(type), type(type),
value(value), value(value),

View File

@ -100,10 +100,6 @@ QPDFWriter::QPDFWriter(
setOutputFile(description, file, close_file); setOutputFile(description, file, close_file);
} }
QPDFWriter::~QPDFWriter()
{
}
void void
QPDFWriter::setOutputFilename(char const* filename) QPDFWriter::setOutputFilename(char const* filename)
{ {

View File

@ -14,10 +14,6 @@ QPDF_Array::QPDF_Array(SparseOHArray const& items) :
{ {
} }
QPDF_Array::~QPDF_Array()
{
}
void void
QPDF_Array::releaseResolved() QPDF_Array::releaseResolved()
{ {

View File

@ -5,10 +5,6 @@ QPDF_Bool::QPDF_Bool(bool val) :
{ {
} }
QPDF_Bool::~QPDF_Bool()
{
}
std::string std::string
QPDF_Bool::unparse() QPDF_Bool::unparse()
{ {

View File

@ -9,10 +9,6 @@ QPDF_Dictionary::QPDF_Dictionary(
{ {
} }
QPDF_Dictionary::~QPDF_Dictionary()
{
}
void void
QPDF_Dictionary::releaseResolved() QPDF_Dictionary::releaseResolved()
{ {

View File

@ -7,10 +7,6 @@ QPDF_InlineImage::QPDF_InlineImage(std::string const& val) :
{ {
} }
QPDF_InlineImage::~QPDF_InlineImage()
{
}
std::string std::string
QPDF_InlineImage::unparse() QPDF_InlineImage::unparse()
{ {

Some files were not shown because too many files have changed in this diff Show More