utf8_iterators: rename underlying_iterator to base
This commit is contained in:
parent
70bf71e51f
commit
245e68e26e
|
@ -660,7 +660,7 @@ static String assist(String message, CharCount maxWidth)
|
||||||
col = 0;
|
col = 0;
|
||||||
}
|
}
|
||||||
if (*word_begin != '\n')
|
if (*word_begin != '\n')
|
||||||
line += String(word_begin.underlying_iterator(), word_end.underlying_iterator());
|
line += String{word_begin.base(), word_end.base()};
|
||||||
word_begin = word_end;
|
word_begin = word_end;
|
||||||
}
|
}
|
||||||
if (not line.empty())
|
if (not line.empty())
|
||||||
|
|
|
@ -320,10 +320,10 @@ void expand_unprintable(const Window& window, DisplayBuffer& display_buffer)
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << "U+" << std::hex << cp;
|
oss << "U+" << std::hex << cp;
|
||||||
String str = oss.str();
|
String str = oss.str();
|
||||||
if (it.underlying_iterator().coord() != atom_it->content.begin())
|
if (it.base().coord() != atom_it->content.begin())
|
||||||
atom_it = ++line.split(atom_it, it.underlying_iterator().coord());
|
atom_it = ++line.split(atom_it, it.base().coord());
|
||||||
if ((it+1).underlying_iterator().coord() != atom_it->content.end())
|
if ((it+1).base().coord() != atom_it->content.end())
|
||||||
atom_it = line.split(atom_it, (it+1).underlying_iterator().coord());
|
atom_it = line.split(atom_it, (it+1).base().coord());
|
||||||
atom_it->content.replace(str);
|
atom_it->content.replace(str);
|
||||||
atom_it->colors = { Colors::Red, Colors::Black };
|
atom_it->colors = { Colors::Red, Colors::Black };
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -185,7 +185,7 @@ using Utf8Policy = utf8::InvalidBytePolicy::Pass;
|
||||||
using Utf8Iterator = utf8::utf8_iterator<String::const_iterator, Utf8Policy>;
|
using Utf8Iterator = utf8::utf8_iterator<String::const_iterator, Utf8Policy>;
|
||||||
void addutf8str(WINDOW* win, Utf8Iterator begin, Utf8Iterator end)
|
void addutf8str(WINDOW* win, Utf8Iterator begin, Utf8Iterator end)
|
||||||
{
|
{
|
||||||
waddstr(win, std::string(begin.underlying_iterator(), end.underlying_iterator()).c_str());
|
waddstr(win, std::string(begin.base(), end.base()).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisplayCoord window_size(WINDOW* win)
|
static DisplayCoord window_size(WINDOW* win)
|
||||||
|
|
|
@ -69,7 +69,7 @@ void skip_while_reverse(Iterator& it, const BeginIterator& begin, T condition)
|
||||||
|
|
||||||
Range utf8_range(const Utf8Iterator& first, const Utf8Iterator& last)
|
Range utf8_range(const Utf8Iterator& first, const Utf8Iterator& last)
|
||||||
{
|
{
|
||||||
return {first.underlying_iterator().coord(), last.underlying_iterator().coord()};
|
return {first.base().coord(), last.base().coord()};
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,8 +117,8 @@ public:
|
||||||
return get_value();
|
return get_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
const Iterator& underlying_iterator() const { return m_it; }
|
const Iterator& base() const { return m_it; }
|
||||||
Iterator& underlying_iterator() { return m_it; }
|
Iterator& base() { return m_it; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void check_invariant() const
|
void check_invariant() const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user