Remove dead code in CPDF_TextPage::Init().
The loop inside CPDF_TextPage::Init() checks to see if `m_CharIndices`
is empty. It is never empty because the only way to enter the loop is to
first add an item to the vector. The loop also never removes any
elements from the vector.
Change-Id: I4274a50de1fc3832727aa650606cdf808fe6e9df
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/98290
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 3e19578..8a20482 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -304,14 +304,10 @@
if (m_CharIndices.size() % 2) {
m_CharIndices.push_back(1);
} else {
- if (m_CharIndices.empty())
- continue;
m_CharIndices.back() += 1;
}
} else {
if (m_CharIndices.size() % 2) {
- if (m_CharIndices.empty())
- continue;
m_CharIndices.back() = i + 1;
} else {
m_CharIndices.push_back(i + 1);