diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-07-13 15:24:19 +0200 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-10-01 17:17:39 +0200 |
commit | cb0a6be983b7e4ee2784991273777579dcb90b9d (patch) | |
tree | 5f07ee022874b651f0c36016cb5df10cd32ffffe /libqpdf/QPDF_linearization.cc | |
parent | 5ccab4be03701744f9795b37b4e5835b1a7b1c1d (diff) | |
download | qpdf-cb0a6be983b7e4ee2784991273777579dcb90b9d.tar.zst |
Code tidy: use QPDF::toS and QPDF::toI where possible
Diffstat (limited to 'libqpdf/QPDF_linearization.cc')
-rw-r--r-- | libqpdf/QPDF_linearization.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libqpdf/QPDF_linearization.cc b/libqpdf/QPDF_linearization.cc index 2444b317..888b4262 100644 --- a/libqpdf/QPDF_linearization.cc +++ b/libqpdf/QPDF_linearization.cc @@ -128,8 +128,7 @@ QPDF::isLinearized() (t2.getType() == QPDFTokenizer::tt_integer) && (t3 == QPDFTokenizer::Token(QPDFTokenizer::tt_word, "obj")) && (t4.getType() == QPDFTokenizer::tt_dict_open)) { - lindict_obj = - QIntC::to_int(QUtil::string_to_ll(t1.getValue().c_str())); + lindict_obj = toI(QUtil::string_to_ll(t1.getValue().c_str())); } } @@ -143,8 +142,7 @@ QPDF::isLinearized() } QPDFObjectHandle linkey = candidate.getKey("/Linearized"); - if (!(linkey.isNumber() && - (QIntC::to_int(floor(linkey.getNumericValue())) == 1))) { + if (!(linkey.isNumber() && (toI(floor(linkey.getNumericValue())) == 1))) { return false; } @@ -1797,7 +1795,7 @@ QPDF::calculateHSharedObject( soe.push_back(HSharedObjectEntry()); soe.at(i).delta_group_length = length; } - if (soe.size() != QIntC::to_size(cso.nshared_total)) { + if (soe.size() != toS(cso.nshared_total)) { stopOnError("soe has wrong size after initialization"); } |