Add support for U_ICU_VERSION_MAJOR_NUM >= 59 (#3729)
This commit is contained in:
parent
24d07e7792
commit
9e58c89043
2 changed files with 5 additions and 1 deletions
|
@ -40,6 +40,7 @@
|
||||||
#include <mapnik/warning_ignore.hpp>
|
#include <mapnik/warning_ignore.hpp>
|
||||||
#include <harfbuzz/hb.h>
|
#include <harfbuzz/hb.h>
|
||||||
#include <harfbuzz/hb-ft.h>
|
#include <harfbuzz/hb-ft.h>
|
||||||
|
#include <unicode/uvernum.h>
|
||||||
#include <unicode/uscript.h>
|
#include <unicode/uscript.h>
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
@ -54,7 +55,8 @@ static inline hb_script_t _icu_script_to_script(UScriptCode script)
|
||||||
static inline const uint16_t * uchar_to_utf16(const UChar* src)
|
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");
|
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);
|
return reinterpret_cast<const uint16_t *>(src);
|
||||||
#else
|
#else
|
||||||
return src;
|
return src;
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
// std
|
// std
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
// icu
|
||||||
|
#include <unicode/unistr.h>
|
||||||
|
|
||||||
struct UConverter;
|
struct UConverter;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue