summaryrefslogtreecommitdiff
path: root/source/fud_utf8_iterator.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-27 21:50:16 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-27 21:50:16 -0500
commitc3cf6df863828798ed8230b0f0966bcf3b2d08dd (patch)
treec03f94128e4892d503532f7fb886dcd86fafdf72 /source/fud_utf8_iterator.cpp
parent7174a2741a6f7aa93c9d077dee384f8aa76d7a02 (diff)
Excise std::optional.
Diffstat (limited to 'source/fud_utf8_iterator.cpp')
-rw-r--r--source/fud_utf8_iterator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fud_utf8_iterator.cpp b/source/fud_utf8_iterator.cpp
index a815c64..00ce146 100644
--- a/source/fud_utf8_iterator.cpp
+++ b/source/fud_utf8_iterator.cpp
@@ -19,33 +19,33 @@
namespace fud {
-std::optional<FudUtf8> Utf8Iterator::peek() const
+Option<FudUtf8> Utf8Iterator::peek() const
{
if (m_index >= m_view.length()) {
- return std::nullopt;
+ return NullOpt;
}
auto character = FudUtf8::from(m_view, m_index);
if (!character.valid()) {
- return std::nullopt;
+ return NullOpt;
}
return character;
}
-std::optional<FudUtf8> Utf8Iterator::next()
+Option<FudUtf8> Utf8Iterator::next()
{
if (m_index >= m_view.length()) {
m_index = m_view.length();
- return std::nullopt;
+ return NullOpt;
}
auto character = FudUtf8::from(m_view, m_index);
if (!character.valid()) {
m_index = m_view.length();
- return std::nullopt;
+ return NullOpt;
}
m_index += character.size();