switched skslc to_string strategy after repeated problems on Android

BUG=skia:

Change-Id: I9e27d06351e4bfcd503882b2c604878b44b6e5cc
Reviewed-on: https://skia-review.googlesource.com/11015
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
Ethan Nicholas 2017-03-31 18:53:05 -04:00 committed by Skia Commit-Bot
parent 8cc718a626
commit c8c176025c

View File

@ -8,9 +8,7 @@
#include "SkSLString.h"
#include "SkSLUtil.h"
#include <cinttypes>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <locale>
#include <sstream>
@ -117,11 +115,15 @@ String to_string(uint32_t value) {
}
String to_string(int64_t value) {
return SkSL::String::printf("%" PRId64, value);
std::stringstream buffer;
buffer << value;
return String(buffer.str().c_str());
}
String to_string(uint64_t value) {
return SkSL::String::printf("%" PRIu64, value);
std::stringstream buffer;
buffer << value;
return String(buffer.str().c_str());
}
String to_string(double value) {