summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-06-05 19:19:35 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-06-06 19:44:07 +0200
commit245e68e26e850dbc7d3bced309d48e67aeb5332d (patch)
tree3f6b1201f52ae87d72e321c409d96de426817cf0 /src
parent70bf71e51fb8433cbbd3170d698ad3dc28ce8d16 (diff)
utf8_iterators: rename underlying_iterator to base
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc2
-rw-r--r--src/highlighters.cc8
-rw-r--r--src/ncurses.cc2
-rw-r--r--src/selectors.cc2
-rw-r--r--src/utf8_iterator.hh4
5 files changed, 9 insertions, 9 deletions
diff --git a/src/commands.cc b/src/commands.cc
index b6c9a1c6..b46b1b63 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -660,7 +660,7 @@ static String assist(String message, CharCount maxWidth)
col = 0;
}
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;
}
if (not line.empty())
diff --git a/src/highlighters.cc b/src/highlighters.cc
index 10d0bdff..2bb08ec0 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -320,10 +320,10 @@ void expand_unprintable(const Window& window, DisplayBuffer& display_buffer)
std::ostringstream oss;
oss << "U+" << std::hex << cp;
String str = oss.str();
- if (it.underlying_iterator().coord() != atom_it->content.begin())
- atom_it = ++line.split(atom_it, it.underlying_iterator().coord());
- if ((it+1).underlying_iterator().coord() != atom_it->content.end())
- atom_it = line.split(atom_it, (it+1).underlying_iterator().coord());
+ if (it.base().coord() != atom_it->content.begin())
+ atom_it = ++line.split(atom_it, it.base().coord());
+ if ((it+1).base().coord() != atom_it->content.end())
+ atom_it = line.split(atom_it, (it+1).base().coord());
atom_it->content.replace(str);
atom_it->colors = { Colors::Red, Colors::Black };
break;
diff --git a/src/ncurses.cc b/src/ncurses.cc
index 11f6e340..7b423fac 100644
--- a/src/ncurses.cc
+++ b/src/ncurses.cc
@@ -185,7 +185,7 @@ using Utf8Policy = utf8::InvalidBytePolicy::Pass;
using Utf8Iterator = utf8::utf8_iterator<String::const_iterator, Utf8Policy>;
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)
diff --git a/src/selectors.cc b/src/selectors.cc
index 06eb6842..2d015b55 100644
--- a/src/selectors.cc
+++ b/src/selectors.cc
@@ -69,7 +69,7 @@ void skip_while_reverse(Iterator& it, const BeginIterator& begin, T condition)
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()};
}
}
diff --git a/src/utf8_iterator.hh b/src/utf8_iterator.hh
index 7b735aa5..d41bb397 100644
--- a/src/utf8_iterator.hh
+++ b/src/utf8_iterator.hh
@@ -117,8 +117,8 @@ public:
return get_value();
}
- const Iterator& underlying_iterator() const { return m_it; }
- Iterator& underlying_iterator() { return m_it; }
+ const Iterator& base() const { return m_it; }
+ Iterator& base() { return m_it; }
protected:
void check_invariant() const