Use SkScalar type where appropriate.

Change-Id: Iec4c3dedd0790fc637a914517b2abbb8e303520f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306320
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
John Stiles 2020-07-28 15:42:39 -04:00 committed by Skia Commit-Bot
parent 34344e20b0
commit ace773d8c0
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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