diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-05-15 19:50:45 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-15 19:50:45 +0000 |
commit | 22b448a7859d21b63172a69a66bf0ef25d3cdeb6 (patch) | |
tree | 131941ee19b44614e0c407ff2357425490bd0ee1 /xfa/fgas/layout/cfx_break.cpp | |
parent | 16e9ecf374e22a8ab9b4de2dfa87b048ae37dcbe (diff) | |
download | pdfium-22b448a7859d21b63172a69a66bf0ef25d3cdeb6.tar.xz |
Remove CFX_BreakLine::CountChars
The CFX_BreakLine::CountChars is a thin wrapper around getting the size
of the m_LineChars vector. This CL removes CountChars and uses the
vectory directly.
Change-Id: I6b172c090aa7acf3282df517a8ae2bbdd55ff15b
Reviewed-on: https://pdfium-review.googlesource.com/32590
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/cfx_break.cpp')
-rw-r--r-- | xfa/fgas/layout/cfx_break.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xfa/fgas/layout/cfx_break.cpp b/xfa/fgas/layout/cfx_break.cpp index b9996b3141..889c043ec2 100644 --- a/xfa/fgas/layout/cfx_break.cpp +++ b/xfa/fgas/layout/cfx_break.cpp @@ -95,11 +95,10 @@ void CFX_Break::SetFontSize(float fFontSize) { void CFX_Break::SetBreakStatus() { ++m_dwIdentity; - int32_t iCount = m_pCurLine->CountChars(); - if (iCount < 1) + if (m_pCurLine->m_LineChars.empty()) return; - CFX_Char* tc = m_pCurLine->GetChar(iCount - 1); + CFX_Char* tc = m_pCurLine->GetChar(m_pCurLine->m_LineChars.size() - 1); if (tc->m_dwStatus == CFX_BreakType::None) tc->m_dwStatus = CFX_BreakType::Piece; } |