diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-24 17:26:50 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-24 17:26:50 +0000 |
commit | 2237541071da7f309c16b3033daa4c6be170dca4 (patch) | |
tree | a468618a44666558fae3432ece2d3439a0ac2537 /fpdfsdk/fpdf_editpath.cpp | |
parent | d86805176f390e0fec1802aae7dbbf1d1d9f53b0 (diff) | |
download | pdfium-2237541071da7f309c16b3033daa4c6be170dca4.tar.xz |
Check CPDFFooObjectFromFPDFPageObject() result.
Instead of checking the FPDF_OBJECT itself. Remove redundant checks and
fix nits.
Change-Id: Id566847d39d16331c08f0b5f3b46431716717b5c
Reviewed-on: https://pdfium-review.googlesource.com/c/44535
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editpath.cpp')
-rw-r--r-- | fpdfsdk/fpdf_editpath.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fpdfsdk/fpdf_editpath.cpp b/fpdfsdk/fpdf_editpath.cpp index a42aaa9c95..83662aa8b5 100644 --- a/fpdfsdk/fpdf_editpath.cpp +++ b/fpdfsdk/fpdf_editpath.cpp @@ -257,7 +257,6 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetMatrix(FPDF_PAGEOBJECT path, *d = pPathObj->m_Matrix.d; *e = pPathObj->m_Matrix.e; *f = pPathObj->m_Matrix.f; - return true; } @@ -268,9 +267,6 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetMatrix(FPDF_PAGEOBJECT path, double d, double e, double f) { - if (!path) - return false; - CPDF_PathObject* pPathObj = CPDFPathObjectFromFPDFPageObject(path); if (!pPathObj) return false; @@ -282,7 +278,6 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetMatrix(FPDF_PAGEOBJECT path, pPathObj->m_Matrix.e = e; pPathObj->m_Matrix.f = f; pPathObj->SetDirty(true); - return true; } @@ -312,14 +307,12 @@ FPDFPathSegment_GetPoint(FPDF_PATHSEGMENT segment, float* x, float* y) { *x = pPathPoint->m_Point.x; *y = pPathPoint->m_Point.y; - return true; } FPDF_EXPORT int FPDF_CALLCONV FPDFPathSegment_GetType(FPDF_PATHSEGMENT segment) { auto* pPathPoint = FXPathPointFromFPDFPathSegment(segment); - return pPathPoint ? static_cast<int>(pPathPoint->m_Type) : FPDF_SEGMENT_UNKNOWN; } @@ -327,6 +320,5 @@ FPDFPathSegment_GetType(FPDF_PATHSEGMENT segment) { FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPathSegment_GetClose(FPDF_PATHSEGMENT segment) { auto* pPathPoint = FXPathPointFromFPDFPathSegment(segment); - return pPathPoint ? pPathPoint->m_CloseFigure : false; } |