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_directory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/fud_directory.cpp') diff --git a/source/fud_directory.cpp b/source/fud_directory.cpp index f46d530..1a1223c 100644 --- a/source/fud_directory.cpp +++ b/source/fud_directory.cpp @@ -152,9 +152,9 @@ Result Directory::info() return retValue; } -Result, FudStatus> Directory::getNextEntry() +Result, FudStatus> Directory::getNextEntry() { - using RetType = Result, FudStatus>; + using RetType = Result, FudStatus>; errno = 0; auto* dirEntry = readdir(m_directory); @@ -163,7 +163,7 @@ Result, FudStatus> Directory::getNextEntry() m_errorCode = errno; return RetType::error(FudStatus::Failure); } - return RetType::okay(std::nullopt); + return RetType::okay(NullOpt); } const char* entryNameCString = dirEntry->d_name; @@ -190,7 +190,7 @@ Result, FudStatus> Directory::getNextEntry() if (retValue.isOkay()) { m_errorCode = 0; - return RetType::okay(retValue.takeOkay()); + return RetType::okay(Option::take(retValue.takeOkay())); } return RetType::error(retValue.getError()); -- cgit v1.2.3