Regex: do not decode utf8 in accept calls as they always run on ascii
This commit is contained in:
parent
ec6ecd5772
commit
0d44cf9591
|
@ -187,13 +187,13 @@ private:
|
|||
|
||||
bool accept(StringView expected)
|
||||
{
|
||||
auto it = m_pos;
|
||||
for (Iterator expected_it{expected.begin(), expected}; expected_it != expected.end(); ++expected_it)
|
||||
auto it = m_pos.base();
|
||||
for (auto expected_it = expected.begin(); expected_it != expected.end(); ++expected_it)
|
||||
{
|
||||
if (it == m_regex.end() or *it++ != *expected_it)
|
||||
return false;
|
||||
}
|
||||
m_pos = it;
|
||||
m_pos = Iterator{it, m_regex};
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user