Commit b5af953b02e04d889a6af96893ead510b11df0bd

Authored by m-holger
1 parent e1560162

Refactor: replace `isNull` calls with `null`, remove redundant `QTC::TC` calls i…

…n `QPDFOutlineObjectHelper` and `QPDFOutlineDocumentHelper`.
libqpdf/QPDFAcroFormDocumentHelper.cc
... ... @@ -502,10 +502,10 @@ QPDFAcroFormDocumentHelper::adjustInheritedFields(
502 502 int q = cur_field.getQuadding();
503 503 if (q != from_default_q) {
504 504 obj.replaceKey("/Q", QPDFObjectHandle::newInteger(from_default_q));
  505 + }
505 506 }
506 507 }
507 508 }
508   -}
509 509  
510 510 namespace
511 511 {
... ...
libqpdf/QPDFOutlineDocumentHelper.cc
1 1 #include <qpdf/QPDFOutlineDocumentHelper.hh>
2 2  
  3 +#include <qpdf/QPDFObjectHandle_private.hh>
3 4 #include <qpdf/QTC.hh>
4 5  
5 6 class QPDFOutlineDocumentHelper::Members
... ... @@ -36,7 +37,7 @@ QPDFOutlineDocumentHelper::QPDFOutlineDocumentHelper(QPDF&amp; qpdf) :
36 37 }
37 38 QPDFObjectHandle cur = outlines.getKey("/First");
38 39 QPDFObjGen::set seen;
39   - while (!cur.isNull() && seen.add(cur)) {
  40 + while (!cur.null() && seen.add(cur)) {
40 41 m->outlines.emplace_back(QPDFOutlineObjectHelper::Accessor::create(cur, *this, 1));
41 42 cur = cur.getKey("/Next");
42 43 }
... ...
libqpdf/QPDFOutlineObjectHelper.cc
1 1 #include <qpdf/QPDFOutlineObjectHelper.hh>
2 2  
  3 +#include <qpdf/QPDFObjectHandle_private.hh>
3 4 #include <qpdf/QPDFOutlineDocumentHelper.hh>
4 5 #include <qpdf/QTC.hh>
5 6  
... ... @@ -19,13 +20,12 @@ QPDFOutlineObjectHelper::QPDFOutlineObjectHelper(
19 20 return;
20 21 }
21 22 if (QPDFOutlineDocumentHelper::Accessor::checkSeen(m->dh, a_oh.getObjGen())) {
22   - QTC::TC("qpdf", "QPDFOutlineObjectHelper loop");
23 23 return;
24 24 }
25 25  
26 26 QPDFObjGen::set children;
27 27 QPDFObjectHandle cur = a_oh.getKey("/First");
28   - while (!cur.isNull() && cur.isIndirect() && children.add(cur)) {
  28 + while (!cur.null() && cur.isIndirect() && children.add(cur)) {
29 29 QPDFOutlineObjectHelper new_ooh(cur, dh, 1 + depth);
30 30 new_ooh.m->parent = std::make_shared<QPDFOutlineObjectHelper>(*this);
31 31 m->kids.push_back(new_ooh);
... ...
qpdf/qpdf.testcov
... ... @@ -326,7 +326,6 @@ QPDFOutlineObjectHelper direct dest 0
326 326 QPDFOutlineObjectHelper action dest 0
327 327 QPDFOutlineObjectHelper named dest 0
328 328 QPDFOutlineDocumentHelper string named dest 0
329   -QPDFOutlineObjectHelper loop 0
330 329 QPDFObjectHandle merge top type mismatch 0
331 330 QPDFObjectHandle merge shallow copy 0
332 331 QPDFObjectHandle merge array 0
... ...