From 529b13ac5d092bbc195e69fe2ba58c0e5b9da4b7 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 23 May 2018 14:50:40 +0000 Subject: Move SkFloatToDecimal pow10 inside anonymous namespace This CL moves the pow10 definition inside the pdfium::skia namespace in order to fix conflicts with the skia version of the same file. This comes up due to the code coverage tools. Bug: chromium:845505 Change-Id: Ief53a2bbd15cb9828be23417ff3442461347d146 Reviewed-on: https://pdfium-review.googlesource.com/32893 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- third_party/skia_shared/SkFloatToDecimal.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/third_party/skia_shared/SkFloatToDecimal.cpp b/third_party/skia_shared/SkFloatToDecimal.cpp index 1f99990b8f..ff7d301bf3 100644 --- a/third_party/skia_shared/SkFloatToDecimal.cpp +++ b/third_party/skia_shared/SkFloatToDecimal.cpp @@ -15,8 +15,12 @@ #include #define SkASSERT assert +namespace pdfium { +namespace skia { +namespace { + // Return pow(10.0, e), optimized for common cases. -static double pow10(int e) { +double pow10(int e) { switch (e) { case 0: return 1.0; // common cases case 1: return 10.0; @@ -48,8 +52,8 @@ static double pow10(int e) { } } -namespace pdfium { -namespace skia { +} // namespace + /** Write a string into result, includeing a terminating '\0' (for unit testing). Return strlen(result) (for SkWStream::write) The resulting string will be in the form /[-]?([0-9]*.)?[0-9]+/ and -- cgit v1.2.3