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:
Maxime Coste 2018-02-11 17:39:19 +11:00
parent 66fe2d84da
commit a822bcd6e0

View File

@ -954,7 +954,7 @@ void show_whitespaces(HighlightContext context, DisplayBuffer& display_buffer, B
for (BufferIterator it = begin; it != end; )
{
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 (coord != begin.coord())
@ -1204,7 +1204,7 @@ void expand_unprintable(HighlightContext context, DisplayBuffer& display_buffer,
end = get_iterator(buffer, atom_it->end()); it < end;)
{
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 (coord != atom_it->begin())