| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "core/fpdfdoc/clines.h" | 7 #include "core/fpdfdoc/clines.h" |
| 8 | 8 |
| 9 #include "core/fpdfdoc/cline.h" |
| 10 |
| 9 CLines::CLines() : m_nTotal(0) {} | 11 CLines::CLines() : m_nTotal(0) {} |
| 10 | 12 |
| 11 CLines::~CLines() { | 13 CLines::~CLines() { |
| 12 RemoveAll(); | 14 RemoveAll(); |
| 13 } | 15 } |
| 14 | 16 |
| 15 int32_t CLines::GetSize() const { | 17 int32_t CLines::GetSize() const { |
| 16 return m_Lines.GetSize(); | 18 return m_Lines.GetSize(); |
| 17 } | 19 } |
| 18 | 20 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 41 } | 43 } |
| 42 return m_nTotal++; | 44 return m_nTotal++; |
| 43 } | 45 } |
| 44 | 46 |
| 45 void CLines::Clear() { | 47 void CLines::Clear() { |
| 46 for (int32_t i = GetSize() - 1; i >= m_nTotal; i--) { | 48 for (int32_t i = GetSize() - 1; i >= m_nTotal; i--) { |
| 47 delete GetAt(i); | 49 delete GetAt(i); |
| 48 m_Lines.RemoveAt(i); | 50 m_Lines.RemoveAt(i); |
| 49 } | 51 } |
| 50 } | 52 } |
| OLD | NEW |