From c8fd054f5fd405542a84b6d489a038889fa2ec22 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 15 May 2018 19:53:54 +0000 Subject: Remove CFX_BreakLine::CountPieces This CL inlines the call to pdfium::CollectionSize for the one usage of CFX_BreakLine::CountPieces. Change-Id: I7eb64486c0a84c329d773f6d55ae277604098baf Reviewed-on: https://pdfium-review.googlesource.com/32591 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fgas/layout/cfx_breakline.cpp | 6 +----- xfa/fgas/layout/cfx_breakline.h | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'xfa') diff --git a/xfa/fgas/layout/cfx_breakline.cpp b/xfa/fgas/layout/cfx_breakline.cpp index 90bf7a08da..1a8ae45247 100644 --- a/xfa/fgas/layout/cfx_breakline.cpp +++ b/xfa/fgas/layout/cfx_breakline.cpp @@ -22,12 +22,8 @@ const CFX_Char* CFX_BreakLine::GetChar(int32_t index) const { return &m_LineChars[index]; } -int32_t CFX_BreakLine::CountPieces() const { - return pdfium::CollectionSize(m_LinePieces); -} - const CFX_BreakPiece* CFX_BreakLine::GetPiece(int32_t index) const { - ASSERT(index >= 0 && index < CountPieces()); + ASSERT(index >= 0 && index < pdfium::CollectionSize(m_LinePieces)); return &m_LinePieces[index]; } diff --git a/xfa/fgas/layout/cfx_breakline.h b/xfa/fgas/layout/cfx_breakline.h index 267f276eeb..ad5ac2d103 100644 --- a/xfa/fgas/layout/cfx_breakline.h +++ b/xfa/fgas/layout/cfx_breakline.h @@ -19,8 +19,6 @@ class CFX_BreakLine { CFX_Char* GetChar(int32_t index); const CFX_Char* GetChar(int32_t index) const; - - int32_t CountPieces() const; const CFX_BreakPiece* GetPiece(int32_t index) const; int32_t GetLineEnd() const; -- cgit v1.2.3