summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/pdf_vt.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfdoc/pdf_vt.h')
-rw-r--r--core/src/fpdfdoc/pdf_vt.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h
index a237ef225e..2cd673fbe5 100644
--- a/core/src/fpdfdoc/pdf_vt.h
+++ b/core/src/fpdfdoc/pdf_vt.h
@@ -223,18 +223,13 @@ class CLines {
}
int32_t Add(const CPVT_LineInfo& lineinfo) {
if (m_nTotal >= GetSize()) {
- if (CLine* pLine = new CLine) {
- pLine->m_LineInfo = lineinfo;
- m_Lines.Add(pLine);
- return m_nTotal++;
- }
- return m_nTotal;
- } else {
- if (CLine* pLine = GetAt(m_nTotal)) {
- pLine->m_LineInfo = lineinfo;
- }
- return m_nTotal++;
+ CLine* pLine = new CLine;
+ pLine->m_LineInfo = lineinfo;
+ m_Lines.Add(pLine);
+ } else if (CLine* pLine = GetAt(m_nTotal)) {
+ pLine->m_LineInfo = lineinfo;
}
+ return m_nTotal++;
}
void Clear() {
for (int32_t i = GetSize() - 1; i >= m_nTotal; i--) {