diff --git a/Userland/Libraries/LibPDF/DocumentParser.cpp b/Userland/Libraries/LibPDF/DocumentParser.cpp index 5b59bac0ee..8d7e6dc6a2 100644 --- a/Userland/Libraries/LibPDF/DocumentParser.cpp +++ b/Userland/Libraries/LibPDF/DocumentParser.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -425,7 +424,12 @@ PDFErrorOr> DocumentParser::parse_xref_stream() auto number_of_object_entries = dict->get_value("Size").get(); - Vector> subsections; + struct Subsection { + int start; + int count; + }; + + Vector subsections; if (dict->contains(CommonNames::Index)) { auto index_array = TRY(dict->get_array(m_document, CommonNames::Index)); if (index_array->size() % 2 != 0) @@ -449,9 +453,7 @@ PDFErrorOr> DocumentParser::parse_xref_stream() size_t byte_index = 0; - for (auto const& subsection : subsections) { - auto start = subsection.get<0>(); - auto count = subsection.get<1>(); + for (auto [start, count] : subsections) { Vector entries; for (int i = 0; i < count; i++) {