diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-15 11:07:32 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-15 17:47:57 +0000 |
commit | e4602321f3175fa5addb6761d0e94f5c2fc93d0c (patch) | |
tree | 6671774659645fad6d9ce55a5910b4665a25094f /fpdfsdk/fpdfeditpath.cpp | |
parent | eb55885e9a9eec670ed98cbd12dc96d63e6a6623 (diff) | |
download | pdfium-e4602321f3175fa5addb6761d0e94f5c2fc93d0c.tar.xz |
Cleanup CFX_PathData.
This CL replaces the array of path points with a vector. Cleaning up the usage
as required.
Change-Id: Ifa386a2c847005fef68af748ebe99c4e08961238
Reviewed-on: https://pdfium-review.googlesource.com/2710
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfeditpath.cpp')
-rw-r--r-- | fpdfsdk/fpdfeditpath.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfeditpath.cpp b/fpdfsdk/fpdfeditpath.cpp index f6e103c047..63a887dc85 100644 --- a/fpdfsdk/fpdfeditpath.cpp +++ b/fpdfsdk/fpdfeditpath.cpp @@ -106,15 +106,10 @@ DLLEXPORT FPDF_BOOL FPDFPath_Close(FPDF_PAGEOBJECT path) { return false; auto pPathObj = reinterpret_cast<CPDF_PathObject*>(path); - int numPoints = pPathObj->m_Path.GetPointCount(); - if (numPoints == 0) + if (pPathObj->m_Path.GetPoints().empty()) return false; - FX_PATHPOINT* pPoints = pPathObj->m_Path.GetMutablePoints(); - if (pPoints[numPoints - 1].m_CloseFigure) - return true; - - pPoints[numPoints - 1].m_CloseFigure = true; + pPathObj->m_Path.ClosePath(); return true; } |