Skip to content

Commit

Permalink
Add support for U_ICU_VERSION_MAJOR_NUM >= 59 (#3729)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Jul 19, 2017
1 parent 9447c18 commit d3ec91b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/mapnik/text/harfbuzz_shaper.hpp
Expand Up @@ -40,6 +40,7 @@
#include <mapnik/warning_ignore.hpp>
#include <harfbuzz/hb.h>
#include <harfbuzz/hb-ft.h>
#include <unicode/uvernum.h>
#include <unicode/uscript.h>
#pragma GCC diagnostic pop

Expand All @@ -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<const uint16_t *>(src);
#else
return src;
Expand Down
2 changes: 2 additions & 0 deletions include/mapnik/unicode.hpp
Expand Up @@ -31,6 +31,8 @@
// std
#include <cstdint>
#include <string>
// icu
#include <unicode/unistr.h>

struct UConverter;

Expand Down

0 comments on commit d3ec91b

Please sign in to comment.