summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-05-02 12:37:06 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-05-02 13:08:51 -0700
commit34f9618d31532c7872bef4529eaa138527a320c9 (patch)
tree252e1423262638175727e5fe49e5c2312fea116e /platform
parentfd0f9d1319408c2d33ba8571bcf66dc62f876159 (diff)
downloadqtlocation-mapboxgl-34f9618d31532c7872bef4529eaa138527a320c9.tar.gz
[core] Replace boost::lexical_cast with std::to_string
This removes the only boost dependency from public headers.
Diffstat (limited to 'platform')
-rw-r--r--platform/default/image.cpp9
-rw-r--r--platform/ios/platform.gyp1
-rw-r--r--platform/osx/platform.gyp1
3 files changed, 8 insertions, 3 deletions
diff --git a/platform/default/image.cpp b/platform/default/image.cpp
index 2195a999c9..988d2f4a4e 100644
--- a/platform/default/image.cpp
+++ b/platform/default/image.cpp
@@ -4,10 +4,17 @@
#include <png.h>
+template<size_t max, typename... Args>
+inline static std::string sprintf(const char *msg, Args... args) {
+ char res[max];
+ int len = snprintf(res, sizeof(res), msg, args...);
+ return std::string(res, len);
+}
+
const static bool png_version_check __attribute__((unused)) = []() {
const png_uint_32 version = png_access_version_number();
if (version != PNG_LIBPNG_VER) {
- throw std::runtime_error(mbgl::util::sprintf<96>(
+ throw std::runtime_error(sprintf<96>(
"libpng version mismatch: headers report %d.%d.%d, but library reports %d.%d.%d",
PNG_LIBPNG_VER / 10000, (PNG_LIBPNG_VER / 100) % 100, PNG_LIBPNG_VER % 100,
version / 10000, (version / 100) % 100, version % 100));
diff --git a/platform/ios/platform.gyp b/platform/ios/platform.gyp
index 9fd2b3de8f..6458a55f2c 100644
--- a/platform/ios/platform.gyp
+++ b/platform/ios/platform.gyp
@@ -110,7 +110,6 @@
'variables': {
'cflags_cc': [
- '<@(boost_cflags)',
'<@(sqlite_cflags)',
'<@(zlib_cflags)',
'<@(rapidjson_cflags)',
diff --git a/platform/osx/platform.gyp b/platform/osx/platform.gyp
index cdea98982a..6b9915f5d5 100644
--- a/platform/osx/platform.gyp
+++ b/platform/osx/platform.gyp
@@ -67,7 +67,6 @@
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
- '<@(boost_cflags)',
'<@(sqlite_cflags)',
'<@(zlib_cflags)',
'<@(rapidjson_cflags)',