mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-02 11:58:25 +00:00
Tidy QdfFixer::checkObjId
This commit is contained in:
parent
71bba5d40d
commit
fc828c2a50
@ -297,14 +297,12 @@ QdfFixer::processLines(std::list<std::string>& lines)
|
||||
void
|
||||
QdfFixer::checkObjId(std::string const& cur_obj_str)
|
||||
{
|
||||
int cur_obj = QUtil::string_to_int(cur_obj_str.c_str());
|
||||
if (cur_obj != last_obj + 1) {
|
||||
if (std::stoi(cur_obj_str) != ++last_obj) {
|
||||
fatal(
|
||||
filename + ":" + std::to_string(lineno) + ": expected object " +
|
||||
std::to_string(last_obj + 1));
|
||||
std::to_string(last_obj));
|
||||
}
|
||||
last_obj = cur_obj;
|
||||
xref.push_back(QPDFXRefEntry(1, QIntC::to_offset(last_offset), 0));
|
||||
xref.push_back(QPDFXRefEntry(1, last_offset, 0));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user