From d3ec91b29b364681e393ff7910b883d7f22e2243 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 19 Jul 2017 16:07:39 +0200 Subject: [PATCH] Add support for U_ICU_VERSION_MAJOR_NUM >= 59 (#3729) --- include/mapnik/text/harfbuzz_shaper.hpp | 4 +++- include/mapnik/unicode.hpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/mapnik/text/harfbuzz_shaper.hpp b/include/mapnik/text/harfbuzz_shaper.hpp index 8b574b095..14151cf7d 100644 --- a/include/mapnik/text/harfbuzz_shaper.hpp +++ b/include/mapnik/text/harfbuzz_shaper.hpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #pragma GCC diagnostic pop @@ -55,7 +56,8 @@ static inline hb_script_t _icu_script_to_script(UScriptCode script) static inline const uint16_t * uchar_to_utf16(const UChar* src) { static_assert(sizeof(UChar) == sizeof(uint16_t),"UChar is eq size to uint16_t"); -#if defined(_MSC_VER) +#if defined(_MSC_VER) || (U_ICU_VERSION_MAJOR_NUM >= 59) + // ^^ http://site.icu-project.org/download/59#TOC-ICU4C-char16_t1 return reinterpret_cast(src); #else return src; diff --git a/include/mapnik/unicode.hpp b/include/mapnik/unicode.hpp index f3b270cb9..83ed3b126 100644 --- a/include/mapnik/unicode.hpp +++ b/include/mapnik/unicode.hpp @@ -31,6 +31,8 @@ // std #include #include +// icu +#include struct UConverter;