aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_linearization.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-07-13 15:24:19 +0200
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-10-01 17:17:39 +0200
commitcb0a6be983b7e4ee2784991273777579dcb90b9d (patch)
tree5f07ee022874b651f0c36016cb5df10cd32ffffe /libqpdf/QPDF_linearization.cc
parent5ccab4be03701744f9795b37b4e5835b1a7b1c1d (diff)
downloadqpdf-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.cc8
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");
}