Commit d5d9d745 authored by Laurent Montel's avatar Laurent Montel 😁

Minor

parent c1d32254
......@@ -62,11 +62,12 @@ bool Extractor::load(const QString &fileName)
}
std::unique_ptr<ExtractorRule> rule;
if (reader.name() == QLatin1String("variable")) {
QStringRef readerName = reader.name();
if (readerName == QLatin1String("variable")) {
rule.reset(new ExtractorVariableRule);
} else if (reader.name() == QLatin1String("class")) {
} else if (readerName == QLatin1String("class")) {
rule.reset(new ExtractorClassRule);
} else if (reader.name() == QLatin1String("property")) {
} else if (readerName == QLatin1String("property")) {
rule.reset(new ExtractorPropertyRule);
} else {
return false;
......
......@@ -72,7 +72,7 @@ void ExtractorPreprocessor::preprocessPdf(const QByteArray &input)
return;
}
for (int i = 0; i < doc->numPages(); ++i) {
for (int i = 0, total = doc->numPages(); i < total; ++i) {
std::unique_ptr<Poppler::Page> page(doc->page(i));
m_buffer += page->text({}, Poppler::Page::PhysicalLayout);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment