diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-27 21:50:16 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-27 21:50:16 -0500 |
commit | c3cf6df863828798ed8230b0f0966bcf3b2d08dd (patch) | |
tree | c03f94128e4892d503532f7fb886dcd86fafdf72 /source/fud_string.cpp | |
parent | 7174a2741a6f7aa93c9d077dee384f8aa76d7a02 (diff) |
Excise std::optional.
Diffstat (limited to 'source/fud_string.cpp')
-rw-r--r-- | source/fud_string.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fud_string.cpp b/source/fud_string.cpp index 3ba6603..caa35e9 100644 --- a/source/fud_string.cpp +++ b/source/fud_string.cpp @@ -276,10 +276,10 @@ FudStatus String::reserve(size_t newCapacity) return resize(newCapacity); } -[[nodiscard]] std::optional<utf8> String::back() +[[nodiscard]] Option<utf8> String::back() { if (!valid()) { - return std::nullopt; + return NullOpt; } utf8 backChar = data()[m_length - 1]; @@ -287,17 +287,17 @@ FudStatus String::reserve(size_t newCapacity) return backChar; } - return std::nullopt; + return NullOpt; } -std::optional<utf8> String::pop() +Option<utf8> String::pop() { if (!valid()) { - return std::nullopt; + return NullOpt; } if (m_length < 1) { - return std::nullopt; + return NullOpt; } m_length--; |