From c3cf6df863828798ed8230b0f0966bcf3b2d08dd Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 27 Oct 2024 21:50:16 -0500 Subject: Excise std::optional. --- source/fud_string.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/fud_string.cpp') 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 String::back() +[[nodiscard]] Option 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 String::pop() +Option String::pop() { if (!valid()) { - return std::nullopt; + return NullOpt; } if (m_length < 1) { - return std::nullopt; + return NullOpt; } m_length--; -- cgit v1.2.3