From 3185187d256ca26f2c1bf8d29196f4ac4462907e Mon Sep 17 00:00:00 2001 From: Jonathan Feinberg Date: Thu, 22 Feb 2018 19:16:55 +0000 Subject: Add namespaces to duplicated Skia code. When pdfium is imported into Google's internal repository, the recently copied Skia decimal formatting code causes only-defined-once violations because many Google internal projects depends on Skia through Google's own copy. This patch puts pdfium's private copy of the needed function into a namespace. Change-Id: Id102b17f6f4652e4a50c4ff75825468fc3d90727 Reviewed-on: https://pdfium-review.googlesource.com/27530 Reviewed-by: Hal Canary Reviewed-by: dsinclair Commit-Queue: dsinclair --- core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi') diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index a2d4d4f125..0584e7be48 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -223,10 +223,11 @@ void CPDF_PageContentGenerator::ProcessPath(std::ostringstream* buf, if (i > 0) *buf << " "; - char buffer[kMaximumSkFloatToDecimalLength]; - unsigned size = SkFloatToDecimal(pPoints[i].m_Point.x, buffer); + char buffer[pdfium::skia::kMaximumSkFloatToDecimalLength]; + unsigned size = + pdfium::skia::SkFloatToDecimal(pPoints[i].m_Point.x, buffer); buf->write(buffer, size) << " "; - size = SkFloatToDecimal(pPoints[i].m_Point.y, buffer); + size = pdfium::skia::SkFloatToDecimal(pPoints[i].m_Point.y, buffer); buf->write(buffer, size); FXPT_TYPE pointType = pPoints[i].m_Type; -- cgit v1.2.3