ams: std::optional -> util::optional

This commit is contained in:
Michael Scire
2021-07-08 02:37:26 -07:00
parent 9df13781c2
commit a7c14e03b9
59 changed files with 950 additions and 147 deletions

View File

@@ -95,7 +95,7 @@ namespace ams::mitm::sysupdater {
private:
Result result;
os::SystemEvent event;
std::optional<ThreadInfo> thread_info;
util::optional<ThreadInfo> thread_info;
ncm::InstallTaskBase *task;
public:
AsyncPrepareSdCardUpdateImpl(ncm::InstallTaskBase *task) : result(ResultSuccess()), event(os::EventClearMode_ManualClear, true), thread_info(), task(task) { /* ... */ }

View File

@@ -497,7 +497,7 @@ namespace ams::mitm::sysupdater {
R_TRY(this->update_transfer_memory->Map(std::addressof(tmem_buffer), os::MemoryPermission_None));
auto tmem_guard = SCOPE_GUARD {
this->update_transfer_memory->Unmap();
this->update_transfer_memory = std::nullopt;
this->update_transfer_memory = util::nullopt;
};
/* Now that the memory is mapped, the input handle is managed and can be released. */

View File

@@ -57,8 +57,8 @@ namespace ams::mitm::sysupdater {
class SystemUpdateService {
private:
SystemUpdateApplyManager apply_manager;
std::optional<ncm::PackageSystemDowngradeTask> update_task;
std::optional<os::TransferMemory> update_transfer_memory;
util::optional<ncm::PackageSystemDowngradeTask> update_task;
util::optional<os::TransferMemory> update_transfer_memory;
bool setup_update;
bool requested_update;
public: