diff options
author | Lei Zhang <thestig@chromium.org> | 2015-10-01 15:08:10 -0700 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-10-01 15:08:10 -0700 |
commit | 24a3b4ea99a40cc251b68561469b9099419adfe9 (patch) | |
tree | 17aaf6ab021ee43d1ba4f665b8047775dd303950 /core/src/fpdfdoc/pdf_vt.h | |
parent | e95f39f10400746f0dc49c8afe3b3f21cdbbf381 (diff) | |
download | pdfium-24a3b4ea99a40cc251b68561469b9099419adfe9.tar.xz |
XFA: Remove tests for failures after new statements.
Manual merge of commit 357d16f8453c2cf0c0afd00eec9e86d03d55fe69.
Original code review: https://codereview.chromium.org/1090693002
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1379683006 .
Diffstat (limited to 'core/src/fpdfdoc/pdf_vt.h')
-rw-r--r-- | core/src/fpdfdoc/pdf_vt.h | 17 |
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--) { |