summaryrefslogtreecommitdiff
path: root/source/fud_directory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fud_directory.cpp')
-rw-r--r--source/fud_directory.cpp8
1 files changed, 4 insertions, 4 deletions
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<DirectoryEntry, FudStatus> Directory::info()
return retValue;
}
-Result<std::optional<DirectoryEntry>, FudStatus> Directory::getNextEntry()
+Result<Option<DirectoryEntry>, FudStatus> Directory::getNextEntry()
{
- using RetType = Result<std::optional<DirectoryEntry>, FudStatus>;
+ using RetType = Result<Option<DirectoryEntry>, FudStatus>;
errno = 0;
auto* dirEntry = readdir(m_directory);
@@ -163,7 +163,7 @@ Result<std::optional<DirectoryEntry>, 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<std::optional<DirectoryEntry>, FudStatus> Directory::getNextEntry()
if (retValue.isOkay()) {
m_errorCode = 0;
- return RetType::okay(retValue.takeOkay());
+ return RetType::okay(Option<DirectoryEntry>::take(retValue.takeOkay()));
}
return RetType::error(retValue.getError());