From ace773d8c0500b7b9d237d505c9b308980bffb47 Mon Sep 17 00:00:00 2001 From: John Stiles Date: Tue, 28 Jul 2020 15:42:39 -0400 Subject: [PATCH] Use SkScalar type where appropriate. Change-Id: Iec4c3dedd0790fc637a914517b2abbb8e303520f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306320 Auto-Submit: John Stiles Commit-Queue: Mike Klein Commit-Queue: Ben Wagner Reviewed-by: Mike Klein Reviewed-by: Ben Wagner --- include/core/SkString.h | 2 +- src/core/SkString.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/core/SkString.h b/include/core/SkString.h index ba6cf52912..e4bd7b7a73 100644 --- a/include/core/SkString.h +++ b/include/core/SkString.h @@ -105,7 +105,7 @@ static constexpr int kSkStrAppendScalar_MaxSize = 15; * Thus if the caller wants to add a 0 at the end, buffer must be at least * kSkStrAppendScalar_MaxSize + 1 bytes large. */ -char* SkStrAppendScalar(char buffer[], float); +char* SkStrAppendScalar(char buffer[], SkScalar); /** \class SkString diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index 89c1e4d0c6..3ed9636ef0 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -150,7 +150,7 @@ char* SkStrAppendS64(char string[], int64_t dec, int minDigits) { return SkStrAppendU64(string, udec, minDigits); } -char* SkStrAppendScalar(char string[], float value) { +char* SkStrAppendScalar(char string[], SkScalar value) { // since floats have at most 8 significant digits, we limit our %g to that. static const char gFormat[] = "%.8g"; // make it 1 larger for the terminating 0