diff --git a/NEWS b/NEWS index f492467d..631857e4 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ ncmpcpp-0.8.2 (????-??-??) * Search engine now properly interacts with filtering * Fixed redraw of separator after interface switch while MPD was stopped * Reset position of a window when fetching lyrics +* Fixed compilation with ICU >= 61. ncmpcpp-0.8.1 (2017-10-11) * Setting 'colors_enabled' to 'no' no longer results in a crash. diff --git a/src/regex_filter.h b/src/regex_filter.h index 8cfe3a64..4a173b55 100644 --- a/src/regex_filter.h +++ b/src/regex_filter.h @@ -42,12 +42,12 @@ namespace { struct StripDiacritics { - static void convert(UnicodeString &s) + static void convert(icu::UnicodeString &s) { if (m_converter == nullptr) { - ErrorCode result; - m_converter = Transliterator::createInstance( + icu::ErrorCode result; + m_converter = icu::Transliterator::createInstance( "NFD; [:M:] Remove; NFC", UTRANS_FORWARD, result); if (result.isFailure()) throw std::runtime_error( @@ -58,10 +58,10 @@ struct StripDiacritics } private: - static Transliterator *m_converter; + static icu::Transliterator *m_converter; }; -Transliterator *StripDiacritics::m_converter; +icu::Transliterator *StripDiacritics::m_converter; #endif // BOOST_REGEX_ICU @@ -99,7 +99,7 @@ inline bool search(const std::basic_string &s, #ifdef BOOST_REGEX_ICU if (ignore_diacritics) { - auto us = UnicodeString::fromUTF8( + auto us = icu::UnicodeString::fromUTF8( StringPiece(convertString::apply(s))); StripDiacritics::convert(us); return boost::u32regex_search(us, rx);