From 4c8f4faae92393d5949115d9767b1b5eec041762 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 8b574b095f..14151cf7d8 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 f3b270cb93..83ed3b126e 100644 --- a/include/mapnik/unicode.hpp +++ b/include/mapnik/unicode.hpp @@ -31,6 +31,8 @@ // std #include #include +// icu +#include struct UConverter;