Remove dead code in CPDF_Annot.
|m_pAnnotDict| is never nullptr.
Change-Id: I32f158ad8800e3d539136b166a54b90957d176d7
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/53250
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp
index 9c7649c..04029ac 100644
--- a/core/fpdfdoc/cpdf_annot.cpp
+++ b/core/fpdfdoc/cpdf_annot.cpp
@@ -154,21 +154,14 @@
}
CFX_FloatRect CPDF_Annot::RectForDrawing() const {
- if (!m_pAnnotDict)
- return CFX_FloatRect();
-
bool bShouldUseQuadPointsCoords =
m_bIsTextMarkupAnnotation && m_bHasGeneratedAP;
if (bShouldUseQuadPointsCoords)
return BoundingRectFromQuadPoints(m_pAnnotDict.Get());
-
return m_pAnnotDict->GetRectFor(pdfium::annotation::kRect);
}
CFX_FloatRect CPDF_Annot::GetRect() const {
- if (!m_pAnnotDict)
- return CFX_FloatRect();
-
CFX_FloatRect rect = RectForDrawing();
rect.Normalize();
return rect;