summaryrefslogtreecommitdiff
path: root/third_party/skia_shared
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-05-23 14:50:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-23 14:50:40 +0000
commit529b13ac5d092bbc195e69fe2ba58c0e5b9da4b7 (patch)
tree1e45174243dd5143eef77fadab5769c62a939f63 /third_party/skia_shared
parent86688dea3b0d30741a95fd15b5f9ee57b2ae86f1 (diff)
downloadpdfium-529b13ac5d092bbc195e69fe2ba58c0e5b9da4b7.tar.xz
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 <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'third_party/skia_shared')
-rw-r--r--third_party/skia_shared/SkFloatToDecimal.cpp10
1 files 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 <cassert>
#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