aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-05-12 10:09:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-12 10:09:58 -0700
commitdd05e2a96ee3984c91817f87c0ea63b142de1cbb (patch)
tree96a7ec0618538b00a569599969dd703d927a22c6
parent13b9c95295f4c5732e34574789e721a6bc08f7b4 (diff)
using_skia_and_harfbuzz: compile w/ Android NDK
-rw-r--r--tools/using_skia_and_harfbuzz.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/using_skia_and_harfbuzz.cpp b/tools/using_skia_and_harfbuzz.cpp
index 86c9accd33..1694e962e0 100644
--- a/tools/using_skia_and_harfbuzz.cpp
+++ b/tools/using_skia_and_harfbuzz.cpp
@@ -9,9 +9,11 @@
// produce a PDF file from UTF-8 text in stdin.
#include <cassert>
+#include <cstdlib>
#include <iostream>
#include <map>
#include <string>
+#include <sstream>
#include <hb-ot.h>
@@ -46,7 +48,9 @@ struct DoubleOption : Option<double> {
value = atof(_value.c_str());
}
virtual std::string valueToString() {
- return std::to_string(value);
+ std::ostringstream stm;
+ stm << value;
+ return stm.str();
}
DoubleOption(std::string selector, std::string description, double defaultValue) :
Option<double>(selector, description, defaultValue) {}