Avoid UniChar conflict with Apple’s define.

This commit is contained in:
Alex Zolotarev 2016-02-26 21:10:27 +03:00 committed by Sergey Yershov
parent 4796e428ba
commit 48c686fb16

View file

@ -10,11 +10,10 @@ namespace search
// It does some magic text transformation which greatly helps us to improve our search.
inline strings::UniString NormalizeAndSimplifyString(string const & s)
{
using namespace strings;
UniString uniString = MakeUniString(s);
strings::UniString uniString = strings::MakeUniString(s);
for (size_t i = 0; i < uniString.size(); ++i)
{
UniChar & c = uniString[i];
strings::UniChar & c = uniString[i];
switch (c)
{
// Replace "d with stroke" to simple d letter. Used in Vietnamese.
@ -48,7 +47,7 @@ inline strings::UniString NormalizeAndSimplifyString(string const & s)
NormalizeInplace(uniString);
// Remove accents that can appear after NFKD normalization.
uniString.erase_if([](UniChar const & c)
uniString.erase_if([](strings::UniChar const & c)
{
// ̀ COMBINING GRAVE ACCENT
// ́ COMBINING ACUTE ACCENT