From 2237541071da7f309c16b3033daa4c6be170dca4 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 24 Oct 2018 17:26:50 +0000 Subject: 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 Commit-Queue: Lei Zhang --- fpdfsdk/fpdf_editpath.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'fpdfsdk/fpdf_editpath.cpp') 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(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; } -- cgit v1.2.3