diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-31 16:33:45 -0400 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-31 16:33:45 -0400 |
commit | a50042349c002dcac2812c0ee046025b36ee45a4 (patch) | |
tree | 6e996229aead47a6d9a8f1e2c702454cc2110f56 /include | |
parent | 8dda6482fa429e01da087a690ca7d9cde3a7abc0 (diff) | |
parent | ffc42cac0232cb4c30ed946717414174fd42de8b (diff) | |
download | qtlocation-mapboxgl-a50042349c002dcac2812c0ee046025b36ee45a4.tar.gz |
Merge branch 'master' into platform-image
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/platform/gl.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/util/utf.hpp | 14 | ||||
-rw-r--r-- | include/mbgl/util/uv-messenger.h | 3 |
3 files changed, 11 insertions, 7 deletions
diff --git a/include/mbgl/platform/gl.hpp b/include/mbgl/platform/gl.hpp index cc2a681d42..d5162f2c70 100644 --- a/include/mbgl/platform/gl.hpp +++ b/include/mbgl/platform/gl.hpp @@ -38,7 +38,6 @@ #else #define GL_GLEXT_PROTOTYPES #include <GL/gl.h> - #include <GL/glu.h> #include <GL/glext.h> #endif diff --git a/include/mbgl/util/utf.hpp b/include/mbgl/util/utf.hpp index bb63179123..ddf0ff3069 100644 --- a/include/mbgl/util/utf.hpp +++ b/include/mbgl/util/utf.hpp @@ -4,10 +4,11 @@ #include <memory> // g++/libstdc++ is missing c++11 codecvt support -#if ! defined(__clang__) || defined(__linux__) +#if 1//! defined(__clang__) || defined(__linux__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-local-typedefs" -#include <boost/locale.hpp> +//#include <boost/locale.hpp> +#include <boost/regex/pending/unicode_iterator.hpp> #pragma GCC diagnostic pop #else // Assume that codecvt is present on clang on non-linux systems @@ -19,13 +20,16 @@ namespace mbgl { namespace util { -#if ! defined(__clang__) || defined(__linux__) +#if 1 //! defined(__clang__) || defined(__linux__) class utf8_to_utf32 { public: explicit utf8_to_utf32() {} - std::u32string convert(std::string const& utf8) { - return boost::locale::conv::utf_to_utf<char32_t>(utf8); + std::u32string convert(std::string const& utf8) + { + boost::u8_to_u32_iterator<std::string::const_iterator> begin(utf8.begin()); + boost::u8_to_u32_iterator<std::string::const_iterator> end(utf8.end()); + return std::u32string(begin,end); } }; diff --git a/include/mbgl/util/uv-messenger.h b/include/mbgl/util/uv-messenger.h index 82b8ef2d9c..946867fe8b 100644 --- a/include/mbgl/util/uv-messenger.h +++ b/include/mbgl/util/uv-messenger.h @@ -15,13 +15,14 @@ struct uv_messenger_s { uv_mutex_t mutex; uv_async_t async; uv_messenger_cb callback; + uv_messenger_stop_cb stop_callback; void *data; void *queue[2]; }; int uv_messenger_init(uv_loop_t *loop, uv_messenger_t *msgr, uv_messenger_cb callback); void uv_messenger_send(uv_messenger_t *msgr, void *arg); -void uv_messenger_stop(uv_messenger_t *msgr); +void uv_messenger_stop(uv_messenger_t *msgr, uv_messenger_stop_cb stop_callback); void uv_messenger_ref(uv_messenger_t *msgr); void uv_messenger_unref(uv_messenger_t *msgr); |