Remove always true method params

Cleanup a couple methods in RTFBreak and TextBreak which always recieve true
as their parameter.

Change-Id: I4704cdb6200b85e0a1a2990d16158ea58699a110
Reviewed-on: https://pdfium-review.googlesource.com/2879
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
diff --git a/xfa/fgas/layout/fgas_rtfbreak.cpp b/xfa/fgas/layout/fgas_rtfbreak.cpp
index 9791a5f..a3bf58c 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.cpp
+++ b/xfa/fgas/layout/fgas_rtfbreak.cpp
@@ -187,23 +187,20 @@
   }
   return nullptr;
 }
-CFX_RTFLine* CFX_RTFBreak::GetRTFLine(bool bReady) const {
-  if (bReady) {
-    if (m_iReady == 1) {
-      return (CFX_RTFLine*)&m_RTFLine1;
-    } else if (m_iReady == 2) {
-      return (CFX_RTFLine*)&m_RTFLine2;
-    } else {
-      return nullptr;
-    }
-  }
-  ASSERT(m_pCurLine);
-  return m_pCurLine;
+
+CFX_RTFLine* CFX_RTFBreak::GetRTFLine() const {
+  if (m_iReady == 1)
+    return (CFX_RTFLine*)&m_RTFLine1;
+  if (m_iReady == 2)
+    return (CFX_RTFLine*)&m_RTFLine2;
+  return nullptr;
 }
-CFX_RTFPieceArray* CFX_RTFBreak::GetRTFPieces(bool bReady) const {
-  CFX_RTFLine* pRTFLine = GetRTFLine(bReady);
+
+CFX_RTFPieceArray* CFX_RTFBreak::GetRTFPieces() const {
+  CFX_RTFLine* pRTFLine = GetRTFLine();
   return pRTFLine ? &pRTFLine->m_LinePieces : nullptr;
 }
+
 inline FX_CHARTYPE CFX_RTFBreak::GetUnifiedCharType(
     FX_CHARTYPE chartype) const {
   return chartype >= FX_CHARTYPE_ArabicAlef ? FX_CHARTYPE_Arabic : chartype;
@@ -423,7 +420,7 @@
     return dwStatus;
   }
 
-  CFX_RTFLine* pLastLine = GetRTFLine(true);
+  CFX_RTFLine* pLastLine = GetRTFLine();
   if (pLastLine) {
     pCurPieces = &pLastLine->m_LinePieces;
     iCount = pCurPieces->GetSize();
@@ -856,12 +853,12 @@
 }
 
 int32_t CFX_RTFBreak::CountBreakPieces() const {
-  CFX_RTFPieceArray* pRTFPieces = GetRTFPieces(true);
+  CFX_RTFPieceArray* pRTFPieces = GetRTFPieces();
   return pRTFPieces ? pRTFPieces->GetSize() : 0;
 }
 
 const CFX_RTFPiece* CFX_RTFBreak::GetBreakPiece(int32_t index) const {
-  CFX_RTFPieceArray* pRTFPieces = GetRTFPieces(true);
+  CFX_RTFPieceArray* pRTFPieces = GetRTFPieces();
   if (!pRTFPieces)
     return nullptr;
 
@@ -873,7 +870,7 @@
 
 void CFX_RTFBreak::GetLineRect(CFX_RectF& rect) const {
   rect.top = 0;
-  CFX_RTFLine* pRTFLine = GetRTFLine(true);
+  CFX_RTFLine* pRTFLine = GetRTFLine();
   if (!pRTFLine) {
     rect.left = ((FX_FLOAT)m_iBoundaryStart) / 20000.0f;
     rect.width = rect.height = 0;
@@ -903,7 +900,7 @@
   rect.height = ((FX_FLOAT)iLineHeight) / 20.0f;
 }
 void CFX_RTFBreak::ClearBreakPieces() {
-  CFX_RTFLine* pRTFLine = GetRTFLine(true);
+  CFX_RTFLine* pRTFLine = GetRTFLine();
   if (pRTFLine) {
     pRTFLine->RemoveAll(true);
   }
diff --git a/xfa/fgas/layout/fgas_rtfbreak.h b/xfa/fgas/layout/fgas_rtfbreak.h
index be3c180..2389442 100644
--- a/xfa/fgas/layout/fgas_rtfbreak.h
+++ b/xfa/fgas/layout/fgas_rtfbreak.h
@@ -210,8 +210,8 @@
  protected:
   void SetBreakStatus();
   CFX_RTFChar* GetLastChar(int32_t index) const;
-  CFX_RTFLine* GetRTFLine(bool bReady) const;
-  CFX_RTFPieceArray* GetRTFPieces(bool bReady) const;
+  CFX_RTFLine* GetRTFLine() const;
+  CFX_RTFPieceArray* GetRTFPieces() const;
   FX_CHARTYPE GetUnifiedCharType(FX_CHARTYPE chartype) const;
   int32_t GetLastPositionedTab() const;
   bool GetPositionedTab(int32_t& iTabPos) const;
diff --git a/xfa/fgas/layout/fgas_textbreak.cpp b/xfa/fgas/layout/fgas_textbreak.cpp
index fa38897..1ab90b2 100644
--- a/xfa/fgas/layout/fgas_textbreak.cpp
+++ b/xfa/fgas/layout/fgas_textbreak.cpp
@@ -271,9 +271,7 @@
   return nullptr;
 }
 
-CFX_TxtLine* CFX_TxtBreak::GetTxtLine(bool bReady) const {
-  if (!bReady)
-    return m_pCurLine;
+CFX_TxtLine* CFX_TxtBreak::GetTxtLine() const {
   if (m_iReady == 1)
     return m_pTxtLine1.get();
   if (m_iReady == 2)
@@ -281,8 +279,8 @@
   return nullptr;
 }
 
-CFX_TxtPieceArray* CFX_TxtBreak::GetTxtPieces(bool bReady) const {
-  CFX_TxtLine* pTxtLine = GetTxtLine(bReady);
+CFX_TxtPieceArray* CFX_TxtBreak::GetTxtPieces() const {
+  CFX_TxtLine* pTxtLine = GetTxtLine();
   if (!pTxtLine) {
     return nullptr;
   }
@@ -927,7 +925,7 @@
     }
     return dwStatus;
   } else {
-    CFX_TxtLine* pLastLine = GetTxtLine(true);
+    CFX_TxtLine* pLastLine = GetTxtLine();
     if (pLastLine) {
       pCurPieces = pLastLine->m_pLinePieces.get();
       iCount = pCurPieces->GetSize();
@@ -1125,12 +1123,12 @@
 }
 
 int32_t CFX_TxtBreak::CountBreakPieces() const {
-  CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(true);
+  CFX_TxtPieceArray* pTxtPieces = GetTxtPieces();
   return pTxtPieces ? pTxtPieces->GetSize() : 0;
 }
 
 const CFX_TxtPiece* CFX_TxtBreak::GetBreakPiece(int32_t index) const {
-  CFX_TxtPieceArray* pTxtPieces = GetTxtPieces(true);
+  CFX_TxtPieceArray* pTxtPieces = GetTxtPieces();
   if (!pTxtPieces) {
     return nullptr;
   }
@@ -1141,7 +1139,7 @@
 }
 
 void CFX_TxtBreak::ClearBreakPieces() {
-  CFX_TxtLine* pTxtLine = GetTxtLine(true);
+  CFX_TxtLine* pTxtLine = GetTxtLine();
   if (pTxtLine) {
     pTxtLine->RemoveAll(true);
   }
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index 54ded7d..bfd71c2 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -243,8 +243,8 @@
   void SetBreakStatus();
   int32_t GetLineRotation(uint32_t dwStyles) const;
   CFX_TxtChar* GetLastChar(int32_t index, bool bOmitChar = true) const;
-  CFX_TxtLine* GetTxtLine(bool bReady) const;
-  CFX_TxtPieceArray* GetTxtPieces(bool bReady) const;
+  CFX_TxtLine* GetTxtLine() const;
+  CFX_TxtPieceArray* GetTxtPieces() const;
   FX_CHARTYPE GetUnifiedCharType(FX_CHARTYPE dwType) const;
   void ResetArabicContext();
   void ResetContextCharStyles();