Commit ae3642ce42e23bc454ee81e6383100b696670b37
1 parent
5906dd5c
Code tidy - Clang-Tidy rule modernize-use-equals-default
Showing
26 changed files
with
26 additions
and
74 deletions
examples/pdf-count-strings.cc
| ... | ... | @@ -26,9 +26,7 @@ usage() |
| 26 | 26 | class StringCounter: public QPDFObjectHandle::TokenFilter |
| 27 | 27 | { |
| 28 | 28 | public: |
| 29 | - StringCounter() | |
| 30 | - { | |
| 31 | - } | |
| 29 | + StringCounter() = default; | |
| 32 | 30 | ~StringCounter() override = default; |
| 33 | 31 | void handleToken(QPDFTokenizer::Token const&) override; |
| 34 | 32 | void handleEOF() override; | ... | ... |
include/qpdf/QPDF.hh
| ... | ... | @@ -1150,10 +1150,6 @@ class QPDF |
| 1150 | 1150 | // PDF 1.4: Table F.4 |
| 1151 | 1151 | struct HPageOffsetEntry |
| 1152 | 1152 | { |
| 1153 | - HPageOffsetEntry() | |
| 1154 | - { | |
| 1155 | - } | |
| 1156 | - | |
| 1157 | 1153 | int delta_nobjects{0}; // 1 |
| 1158 | 1154 | qpdf_offset_t delta_page_length{0}; // 2 |
| 1159 | 1155 | // vectors' sizes = nshared_objects |
| ... | ... | @@ -1167,10 +1163,6 @@ class QPDF |
| 1167 | 1163 | // PDF 1.4: Table F.3 |
| 1168 | 1164 | struct HPageOffset |
| 1169 | 1165 | { |
| 1170 | - HPageOffset() | |
| 1171 | - { | |
| 1172 | - } | |
| 1173 | - | |
| 1174 | 1166 | int min_nobjects{0}; // 1 |
| 1175 | 1167 | qpdf_offset_t first_page_offset{0}; // 2 |
| 1176 | 1168 | int nbits_delta_nobjects{0}; // 3 |
| ... | ... | @@ -1191,10 +1183,6 @@ class QPDF |
| 1191 | 1183 | // PDF 1.4: Table F.6 |
| 1192 | 1184 | struct HSharedObjectEntry |
| 1193 | 1185 | { |
| 1194 | - HSharedObjectEntry() | |
| 1195 | - { | |
| 1196 | - } | |
| 1197 | - | |
| 1198 | 1186 | // Item 3 is a 128-bit signature (unsupported by Acrobat) |
| 1199 | 1187 | int delta_group_length{0}; // 1 |
| 1200 | 1188 | int signature_present{0}; // 2 -- always 0 |
| ... | ... | @@ -1204,10 +1192,6 @@ class QPDF |
| 1204 | 1192 | // PDF 1.4: Table F.5 |
| 1205 | 1193 | struct HSharedObject |
| 1206 | 1194 | { |
| 1207 | - HSharedObject() | |
| 1208 | - { | |
| 1209 | - } | |
| 1210 | - | |
| 1211 | 1195 | int first_shared_obj{0}; // 1 |
| 1212 | 1196 | qpdf_offset_t first_shared_offset{0}; // 2 |
| 1213 | 1197 | int nshared_first_page{0}; // 3 |
| ... | ... | @@ -1222,10 +1206,6 @@ class QPDF |
| 1222 | 1206 | // PDF 1.4: Table F.9 |
| 1223 | 1207 | struct HGeneric |
| 1224 | 1208 | { |
| 1225 | - HGeneric() | |
| 1226 | - { | |
| 1227 | - } | |
| 1228 | - | |
| 1229 | 1209 | int first_object{0}; // 1 |
| 1230 | 1210 | qpdf_offset_t first_object_offset{0}; // 2 |
| 1231 | 1211 | int nobjects{0}; // 3 |
| ... | ... | @@ -1237,10 +1217,6 @@ class QPDF |
| 1237 | 1217 | // Initialized from Linearization Parameter dictionary |
| 1238 | 1218 | struct LinParameters |
| 1239 | 1219 | { |
| 1240 | - LinParameters() | |
| 1241 | - { | |
| 1242 | - } | |
| 1243 | - | |
| 1244 | 1220 | qpdf_offset_t file_size{0}; // /L |
| 1245 | 1221 | int first_page_object{0}; // /O |
| 1246 | 1222 | qpdf_offset_t first_page_end{0}; // /E |
| ... | ... | @@ -1264,10 +1240,6 @@ class QPDF |
| 1264 | 1240 | |
| 1265 | 1241 | struct CHPageOffsetEntry |
| 1266 | 1242 | { |
| 1267 | - CHPageOffsetEntry() | |
| 1268 | - { | |
| 1269 | - } | |
| 1270 | - | |
| 1271 | 1243 | int nobjects{0}; |
| 1272 | 1244 | int nshared_objects{0}; |
| 1273 | 1245 | // vectors' sizes = nshared_objects |
| ... | ... | @@ -1293,10 +1265,6 @@ class QPDF |
| 1293 | 1265 | // PDF 1.4: Table F.5 |
| 1294 | 1266 | struct CHSharedObject |
| 1295 | 1267 | { |
| 1296 | - CHSharedObject() | |
| 1297 | - { | |
| 1298 | - } | |
| 1299 | - | |
| 1300 | 1268 | int first_shared_obj{0}; |
| 1301 | 1269 | int nshared_first_page{0}; |
| 1302 | 1270 | int nshared_total{0}; | ... | ... |
include/qpdf/QPDFJob.hh
libqpdf/ClosedFileInputSource.cc
| ... | ... | @@ -9,7 +9,7 @@ ClosedFileInputSource::ClosedFileInputSource(char const* filename) : |
| 9 | 9 | { |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | -ClosedFileInputSource::~ClosedFileInputSource() | |
| 12 | +ClosedFileInputSource::~ClosedFileInputSource() // NOLINT (modernize-use-equals-default) | |
| 13 | 13 | { |
| 14 | 14 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 15 | 15 | } | ... | ... |
libqpdf/Pl_Buffer.cc
| ... | ... | @@ -11,7 +11,7 @@ Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : |
| 11 | 11 | { |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | -Pl_Buffer::~Pl_Buffer() | |
| 14 | +Pl_Buffer::~Pl_Buffer() // NOLINT (modernize-use-equals-default) | |
| 15 | 15 | { |
| 16 | 16 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 17 | 17 | } | ... | ... |
libqpdf/Pl_Concatenate.cc
| ... | ... | @@ -5,7 +5,7 @@ Pl_Concatenate::Pl_Concatenate(char const* identifier, Pipeline* next) : |
| 5 | 5 | { |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | -Pl_Concatenate::~Pl_Concatenate() | |
| 8 | +Pl_Concatenate::~Pl_Concatenate() // NOLINT (modernize-use-equals-default) | |
| 9 | 9 | { |
| 10 | 10 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 11 | 11 | } | ... | ... |
libqpdf/Pl_Count.cc
| ... | ... | @@ -14,7 +14,7 @@ Pl_Count::Pl_Count(char const* identifier, Pipeline* next) : |
| 14 | 14 | { |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | -Pl_Count::~Pl_Count() | |
| 17 | +Pl_Count::~Pl_Count() // NOLINT (modernize-use-equals-default) | |
| 18 | 18 | { |
| 19 | 19 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 20 | 20 | } | ... | ... |
libqpdf/Pl_DCT.cc
libqpdf/Pl_Discard.cc
libqpdf/Pl_Flate.cc
libqpdf/Pl_Function.cc
| ... | ... | @@ -39,7 +39,7 @@ Pl_Function::Pl_Function(char const* identifier, Pipeline* next, writer_c_char_t |
| 39 | 39 | }; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | -Pl_Function::~Pl_Function() | |
| 42 | +Pl_Function::~Pl_Function() // NOLINT (modernize-use-equals-default) | |
| 43 | 43 | { |
| 44 | 44 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 45 | 45 | } | ... | ... |
libqpdf/Pl_OStream.cc
| ... | ... | @@ -13,7 +13,7 @@ Pl_OStream::Pl_OStream(char const* identifier, std::ostream& os) : |
| 13 | 13 | { |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -Pl_OStream::~Pl_OStream() | |
| 16 | +Pl_OStream::~Pl_OStream() // NOLINT (modernize-use-equals-default) | |
| 17 | 17 | { |
| 18 | 18 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 19 | 19 | } | ... | ... |
libqpdf/Pl_QPDFTokenizer.cc
| ... | ... | @@ -21,7 +21,7 @@ Pl_QPDFTokenizer::Pl_QPDFTokenizer( |
| 21 | 21 | m->tokenizer.includeIgnorable(); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | -Pl_QPDFTokenizer::~Pl_QPDFTokenizer() | |
| 24 | +Pl_QPDFTokenizer::~Pl_QPDFTokenizer() // NOLINT (modernize-use-equals-default) | |
| 25 | 25 | { |
| 26 | 26 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 27 | 27 | } | ... | ... |
libqpdf/Pl_RunLength.cc
| ... | ... | @@ -16,7 +16,7 @@ Pl_RunLength::Pl_RunLength(char const* identifier, Pipeline* next, action_e acti |
| 16 | 16 | { |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -Pl_RunLength::~Pl_RunLength() | |
| 19 | +Pl_RunLength::~Pl_RunLength() // NOLINT (modernize-use-equals-default) | |
| 20 | 20 | { |
| 21 | 21 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 22 | 22 | } | ... | ... |
libqpdf/Pl_StdioFile.cc
| ... | ... | @@ -17,7 +17,7 @@ Pl_StdioFile::Pl_StdioFile(char const* identifier, FILE* f) : |
| 17 | 17 | { |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -Pl_StdioFile::~Pl_StdioFile() | |
| 20 | +Pl_StdioFile::~Pl_StdioFile() // NOLINT (modernize-use-equals-default) | |
| 21 | 21 | { |
| 22 | 22 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 23 | 23 | } | ... | ... |
libqpdf/Pl_String.cc
| ... | ... | @@ -13,7 +13,7 @@ Pl_String::Pl_String(char const* identifier, Pipeline* next, std::string& s) : |
| 13 | 13 | { |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -Pl_String::~Pl_String() | |
| 16 | +Pl_String::~Pl_String() // NOLINT (modernize-use-equals-default) | |
| 17 | 17 | { |
| 18 | 18 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 19 | 19 | } | ... | ... |
libqpdf/QPDFDocumentHelper.cc
libqpdf/QPDFFormFieldObjectHelper.cc
| ... | ... | @@ -647,10 +647,8 @@ namespace |
| 647 | 647 | class TfFinder: public QPDFObjectHandle::TokenFilter |
| 648 | 648 | { |
| 649 | 649 | public: |
| 650 | - TfFinder(); | |
| 651 | - ~TfFinder() override | |
| 652 | - { | |
| 653 | - } | |
| 650 | + TfFinder() = default; | |
| 651 | + ~TfFinder() override = default; | |
| 654 | 652 | void handleToken(QPDFTokenizer::Token const&) override; |
| 655 | 653 | double getTf(); |
| 656 | 654 | std::string getFontName(); |
| ... | ... | @@ -667,10 +665,6 @@ namespace |
| 667 | 665 | }; |
| 668 | 666 | } // namespace |
| 669 | 667 | |
| 670 | -TfFinder::TfFinder() | |
| 671 | -{ | |
| 672 | -} | |
| 673 | - | |
| 674 | 668 | void |
| 675 | 669 | TfFinder::handleToken(QPDFTokenizer::Token const& token) |
| 676 | 670 | { | ... | ... |
libqpdf/QPDFNameTreeObjectHelper.cc
| ... | ... | @@ -34,7 +34,7 @@ namespace |
| 34 | 34 | |
| 35 | 35 | static NameTreeDetails name_tree_details; |
| 36 | 36 | |
| 37 | -QPDFNameTreeObjectHelper::~QPDFNameTreeObjectHelper() | |
| 37 | +QPDFNameTreeObjectHelper::~QPDFNameTreeObjectHelper() // NOLINT (modernize-use-equals-default) | |
| 38 | 38 | { |
| 39 | 39 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer. For this specific |
| 40 | 40 | // class, see github issue #745. | ... | ... |
libqpdf/QPDFNumberTreeObjectHelper.cc
| ... | ... | @@ -35,7 +35,7 @@ namespace |
| 35 | 35 | |
| 36 | 36 | static NumberTreeDetails number_tree_details; |
| 37 | 37 | |
| 38 | -QPDFNumberTreeObjectHelper::~QPDFNumberTreeObjectHelper() | |
| 38 | +QPDFNumberTreeObjectHelper::~QPDFNumberTreeObjectHelper() // NOLINT (modernize-use-equals-default) | |
| 39 | 39 | { |
| 40 | 40 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer. For this specific |
| 41 | 41 | // class, see github issue #745. | ... | ... |
libqpdf/QPDFObjectHandle.cc
| ... | ... | @@ -49,7 +49,7 @@ QPDFObjectHandle::StreamDataProvider::StreamDataProvider(bool supports_retry) : |
| 49 | 49 | { |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | -QPDFObjectHandle::StreamDataProvider::~StreamDataProvider() | |
| 52 | +QPDFObjectHandle::StreamDataProvider::~StreamDataProvider() // NOLINT (modernize-use-equals-default) | |
| 53 | 53 | { |
| 54 | 54 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 55 | 55 | } | ... | ... |
libqpdf/QPDFObjectHelper.cc
libqpdf/QPDFWriter.cc
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | #include <cstdlib> |
| 27 | 27 | #include <stdexcept> |
| 28 | 28 | |
| 29 | -QPDFWriter::ProgressReporter::~ProgressReporter() | |
| 29 | +QPDFWriter::ProgressReporter::~ProgressReporter() // NOLINT (modernize-use-equals-default) | |
| 30 | 30 | { |
| 31 | 31 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 32 | 32 | } |
| ... | ... | @@ -36,7 +36,8 @@ QPDFWriter::FunctionProgressReporter::FunctionProgressReporter(std::function<voi |
| 36 | 36 | { |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | -QPDFWriter::FunctionProgressReporter::~FunctionProgressReporter() | |
| 39 | +QPDFWriter::FunctionProgressReporter::~FunctionProgressReporter() // NOLINT | |
| 40 | + // (modernize-use-equals-default) | |
| 40 | 41 | { |
| 41 | 42 | // Must be explicit and not inline -- see QPDF_DLL_CLASS in README-maintainer |
| 42 | 43 | } | ... | ... |
libqpdf/QPDFXRefEntry.cc
libqpdf/qpdf/QPDFArgParser.hh
libtests/dct_compress.cc