Do not specify utf8 InvalidPolicy when we are using the default value
It was specified only in two call sites, and everywhere now only uses the pass policy, which is the default.
This commit is contained in:
parent
66fe2d84da
commit
a822bcd6e0
|
@ -954,7 +954,7 @@ void show_whitespaces(HighlightContext context, DisplayBuffer& display_buffer, B
|
||||||
for (BufferIterator it = begin; it != end; )
|
for (BufferIterator it = begin; it != end; )
|
||||||
{
|
{
|
||||||
auto coord = it.coord();
|
auto coord = it.coord();
|
||||||
Codepoint cp = utf8::read_codepoint<utf8::InvalidPolicy::Pass>(it, end);
|
Codepoint cp = utf8::read_codepoint(it, end);
|
||||||
if (cp == '\t' or cp == ' ' or cp == '\n' or cp == 0xA0)
|
if (cp == '\t' or cp == ' ' or cp == '\n' or cp == 0xA0)
|
||||||
{
|
{
|
||||||
if (coord != begin.coord())
|
if (coord != begin.coord())
|
||||||
|
@ -1204,7 +1204,7 @@ void expand_unprintable(HighlightContext context, DisplayBuffer& display_buffer,
|
||||||
end = get_iterator(buffer, atom_it->end()); it < end;)
|
end = get_iterator(buffer, atom_it->end()); it < end;)
|
||||||
{
|
{
|
||||||
auto coord = it.coord();
|
auto coord = it.coord();
|
||||||
Codepoint cp = utf8::read_codepoint<utf8::InvalidPolicy::Pass>(it, end);
|
Codepoint cp = utf8::read_codepoint(it, end);
|
||||||
if (cp != '\n' and not iswprint((wchar_t)cp))
|
if (cp != '\n' and not iswprint((wchar_t)cp))
|
||||||
{
|
{
|
||||||
if (coord != atom_it->begin())
|
if (coord != atom_it->begin())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user