mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
Code tidy - Clang-Tidy rule modernize-use-equals-default
This commit is contained in:
parent
5906dd5c1f
commit
ae3642ce42
@ -26,9 +26,7 @@ usage()
|
|||||||
class StringCounter: public QPDFObjectHandle::TokenFilter
|
class StringCounter: public QPDFObjectHandle::TokenFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StringCounter()
|
StringCounter() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
~StringCounter() override = default;
|
~StringCounter() override = default;
|
||||||
void handleToken(QPDFTokenizer::Token const&) override;
|
void handleToken(QPDFTokenizer::Token const&) override;
|
||||||
void handleEOF() override;
|
void handleEOF() override;
|
||||||
|
@ -1150,10 +1150,6 @@ class QPDF
|
|||||||
// PDF 1.4: Table F.4
|
// PDF 1.4: Table F.4
|
||||||
struct HPageOffsetEntry
|
struct HPageOffsetEntry
|
||||||
{
|
{
|
||||||
HPageOffsetEntry()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int delta_nobjects{0}; // 1
|
int delta_nobjects{0}; // 1
|
||||||
qpdf_offset_t delta_page_length{0}; // 2
|
qpdf_offset_t delta_page_length{0}; // 2
|
||||||
// vectors' sizes = nshared_objects
|
// vectors' sizes = nshared_objects
|
||||||
@ -1167,10 +1163,6 @@ class QPDF
|
|||||||
// PDF 1.4: Table F.3
|
// PDF 1.4: Table F.3
|
||||||
struct HPageOffset
|
struct HPageOffset
|
||||||
{
|
{
|
||||||
HPageOffset()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int min_nobjects{0}; // 1
|
int min_nobjects{0}; // 1
|
||||||
qpdf_offset_t first_page_offset{0}; // 2
|
qpdf_offset_t first_page_offset{0}; // 2
|
||||||
int nbits_delta_nobjects{0}; // 3
|
int nbits_delta_nobjects{0}; // 3
|
||||||
@ -1191,10 +1183,6 @@ class QPDF
|
|||||||
// PDF 1.4: Table F.6
|
// PDF 1.4: Table F.6
|
||||||
struct HSharedObjectEntry
|
struct HSharedObjectEntry
|
||||||
{
|
{
|
||||||
HSharedObjectEntry()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// Item 3 is a 128-bit signature (unsupported by Acrobat)
|
// Item 3 is a 128-bit signature (unsupported by Acrobat)
|
||||||
int delta_group_length{0}; // 1
|
int delta_group_length{0}; // 1
|
||||||
int signature_present{0}; // 2 -- always 0
|
int signature_present{0}; // 2 -- always 0
|
||||||
@ -1204,10 +1192,6 @@ class QPDF
|
|||||||
// PDF 1.4: Table F.5
|
// PDF 1.4: Table F.5
|
||||||
struct HSharedObject
|
struct HSharedObject
|
||||||
{
|
{
|
||||||
HSharedObject()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int first_shared_obj{0}; // 1
|
int first_shared_obj{0}; // 1
|
||||||
qpdf_offset_t first_shared_offset{0}; // 2
|
qpdf_offset_t first_shared_offset{0}; // 2
|
||||||
int nshared_first_page{0}; // 3
|
int nshared_first_page{0}; // 3
|
||||||
@ -1222,10 +1206,6 @@ class QPDF
|
|||||||
// PDF 1.4: Table F.9
|
// PDF 1.4: Table F.9
|
||||||
struct HGeneric
|
struct HGeneric
|
||||||
{
|
{
|
||||||
HGeneric()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int first_object{0}; // 1
|
int first_object{0}; // 1
|
||||||
qpdf_offset_t first_object_offset{0}; // 2
|
qpdf_offset_t first_object_offset{0}; // 2
|
||||||
int nobjects{0}; // 3
|
int nobjects{0}; // 3
|
||||||
@ -1237,10 +1217,6 @@ class QPDF
|
|||||||
// Initialized from Linearization Parameter dictionary
|
// Initialized from Linearization Parameter dictionary
|
||||||
struct LinParameters
|
struct LinParameters
|
||||||
{
|
{
|
||||||
LinParameters()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
qpdf_offset_t file_size{0}; // /L
|
qpdf_offset_t file_size{0}; // /L
|
||||||
int first_page_object{0}; // /O
|
int first_page_object{0}; // /O
|
||||||
qpdf_offset_t first_page_end{0}; // /E
|
qpdf_offset_t first_page_end{0}; // /E
|
||||||
@ -1264,10 +1240,6 @@ class QPDF
|
|||||||
|
|
||||||
struct CHPageOffsetEntry
|
struct CHPageOffsetEntry
|
||||||
{
|
{
|
||||||
CHPageOffsetEntry()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int nobjects{0};
|
int nobjects{0};
|
||||||
int nshared_objects{0};
|
int nshared_objects{0};
|
||||||
// vectors' sizes = nshared_objects
|
// vectors' sizes = nshared_objects
|
||||||
@ -1293,10 +1265,6 @@ class QPDF
|
|||||||
// PDF 1.4: Table F.5
|
// PDF 1.4: Table F.5
|
||||||
struct CHSharedObject
|
struct CHSharedObject
|
||||||
{
|
{
|
||||||
CHSharedObject()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int first_shared_obj{0};
|
int first_shared_obj{0};
|
||||||
int nshared_first_page{0};
|
int nshared_first_page{0};
|
||||||
int nshared_total{0};
|
int nshared_total{0};
|
||||||
|
@ -145,10 +145,6 @@ class QPDFJob
|
|||||||
|
|
||||||
struct AddAttachment
|
struct AddAttachment
|
||||||
{
|
{
|
||||||
AddAttachment()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string path;
|
std::string path;
|
||||||
std::string key;
|
std::string key;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
@ -9,7 +9,7 @@ ClosedFileInputSource::ClosedFileInputSource(char const* filename) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
ClosedFileInputSource::~ClosedFileInputSource()
|
ClosedFileInputSource::~ClosedFileInputSource() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_Buffer::~Pl_Buffer()
|
Pl_Buffer::~Pl_Buffer() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ Pl_Concatenate::Pl_Concatenate(char const* identifier, Pipeline* next) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_Concatenate::~Pl_Concatenate()
|
Pl_Concatenate::~Pl_Concatenate() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ Pl_Count::Pl_Count(char const* identifier, Pipeline* next) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_Count::~Pl_Count()
|
Pl_Count::~Pl_Count() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ Pl_DCT::Pl_DCT(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_DCT::~Pl_DCT()
|
Pl_DCT::~Pl_DCT() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ Pl_Discard::Pl_Discard() :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_Discard::~Pl_Discard()
|
Pl_Discard::~Pl_Discard() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ Pl_Flate::Pl_Flate(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_Flate::~Pl_Flate()
|
Pl_Flate::~Pl_Flate() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ Pl_Function::Pl_Function(char const* identifier, Pipeline* next, writer_c_char_t
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_Function::~Pl_Function()
|
Pl_Function::~Pl_Function() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ Pl_OStream::Pl_OStream(char const* identifier, std::ostream& os) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_OStream::~Pl_OStream()
|
Pl_OStream::~Pl_OStream() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ Pl_QPDFTokenizer::Pl_QPDFTokenizer(
|
|||||||
m->tokenizer.includeIgnorable();
|
m->tokenizer.includeIgnorable();
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_QPDFTokenizer::~Pl_QPDFTokenizer()
|
Pl_QPDFTokenizer::~Pl_QPDFTokenizer() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ Pl_RunLength::Pl_RunLength(char const* identifier, Pipeline* next, action_e acti
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_RunLength::~Pl_RunLength()
|
Pl_RunLength::~Pl_RunLength() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_StdioFile::~Pl_StdioFile()
|
Pl_StdioFile::~Pl_StdioFile() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ Pl_String::Pl_String(char const* identifier, Pipeline* next, std::string& s) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Pl_String::~Pl_String()
|
Pl_String::~Pl_String() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <qpdf/QPDFDocumentHelper.hh>
|
#include <qpdf/QPDFDocumentHelper.hh>
|
||||||
|
|
||||||
QPDFDocumentHelper::~QPDFDocumentHelper()
|
QPDFDocumentHelper::~QPDFDocumentHelper() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -647,10 +647,8 @@ namespace
|
|||||||
class TfFinder: public QPDFObjectHandle::TokenFilter
|
class TfFinder: public QPDFObjectHandle::TokenFilter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TfFinder();
|
TfFinder() = default;
|
||||||
~TfFinder() override
|
~TfFinder() override = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
void handleToken(QPDFTokenizer::Token const&) override;
|
void handleToken(QPDFTokenizer::Token const&) override;
|
||||||
double getTf();
|
double getTf();
|
||||||
std::string getFontName();
|
std::string getFontName();
|
||||||
@ -667,10 +665,6 @@ namespace
|
|||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
TfFinder::TfFinder()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TfFinder::handleToken(QPDFTokenizer::Token const& token)
|
TfFinder::handleToken(QPDFTokenizer::Token const& token)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ namespace
|
|||||||
|
|
||||||
static NameTreeDetails name_tree_details;
|
static NameTreeDetails name_tree_details;
|
||||||
|
|
||||||
QPDFNameTreeObjectHelper::~QPDFNameTreeObjectHelper()
|
QPDFNameTreeObjectHelper::~QPDFNameTreeObjectHelper() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer. For this specific
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer. For this specific
|
||||||
// class, see github issue #745.
|
// class, see github issue #745.
|
||||||
|
@ -35,7 +35,7 @@ namespace
|
|||||||
|
|
||||||
static NumberTreeDetails number_tree_details;
|
static NumberTreeDetails number_tree_details;
|
||||||
|
|
||||||
QPDFNumberTreeObjectHelper::~QPDFNumberTreeObjectHelper()
|
QPDFNumberTreeObjectHelper::~QPDFNumberTreeObjectHelper() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer. For this specific
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer. For this specific
|
||||||
// class, see github issue #745.
|
// class, see github issue #745.
|
||||||
|
@ -49,7 +49,7 @@ QPDFObjectHandle::StreamDataProvider::StreamDataProvider(bool supports_retry) :
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QPDFObjectHandle::StreamDataProvider::~StreamDataProvider()
|
QPDFObjectHandle::StreamDataProvider::~StreamDataProvider() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <qpdf/QPDFObjectHelper.hh>
|
#include <qpdf/QPDFObjectHelper.hh>
|
||||||
|
|
||||||
QPDFObjectHelper::~QPDFObjectHelper()
|
QPDFObjectHelper::~QPDFObjectHelper() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
QPDFWriter::ProgressReporter::~ProgressReporter()
|
QPDFWriter::ProgressReporter::~ProgressReporter() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
@ -36,7 +36,8 @@ QPDFWriter::FunctionProgressReporter::FunctionProgressReporter(std::function<voi
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QPDFWriter::FunctionProgressReporter::~FunctionProgressReporter()
|
QPDFWriter::FunctionProgressReporter::~FunctionProgressReporter() // NOLINT
|
||||||
|
// (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
// Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include <qpdf/QIntC.hh>
|
#include <qpdf/QIntC.hh>
|
||||||
#include <qpdf/QPDFExc.hh>
|
#include <qpdf/QPDFExc.hh>
|
||||||
|
|
||||||
QPDFXRefEntry::QPDFXRefEntry()
|
QPDFXRefEntry::QPDFXRefEntry() // NOLINT (modernize-use-equals-default)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,9 +145,6 @@ class QPDFArgParser
|
|||||||
private:
|
private:
|
||||||
struct OptionEntry
|
struct OptionEntry
|
||||||
{
|
{
|
||||||
OptionEntry()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
bool parameter_needed{false};
|
bool parameter_needed{false};
|
||||||
std::string parameter_name;
|
std::string parameter_name;
|
||||||
std::set<std::string> choices;
|
std::set<std::string> choices;
|
||||||
|
@ -17,9 +17,7 @@ usage()
|
|||||||
class Callback: public Pl_DCT::CompressConfig
|
class Callback: public Pl_DCT::CompressConfig
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Callback()
|
Callback() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
~Callback() override = default;
|
~Callback() override = default;
|
||||||
void apply(jpeg_compress_struct*) override;
|
void apply(jpeg_compress_struct*) override;
|
||||||
bool called{false};
|
bool called{false};
|
||||||
|
Loading…
Reference in New Issue
Block a user