Replace boost::optional with std::optional where possible
This commit is contained in:
		@@ -207,7 +207,7 @@ ResultVal<MessageParameter> AppletManager::GlanceParameter(AppletId app_id) {
 | 
			
		||||
    // Note: The NS module always clears the DSPSleep and DSPWakeup signals even in GlanceParameter.
 | 
			
		||||
    if (next_parameter->signal == SignalType::DspSleep ||
 | 
			
		||||
        next_parameter->signal == SignalType::DspWakeup)
 | 
			
		||||
        next_parameter = boost::none;
 | 
			
		||||
        next_parameter = {};
 | 
			
		||||
 | 
			
		||||
    return MakeResult<MessageParameter>(parameter);
 | 
			
		||||
}
 | 
			
		||||
@@ -216,7 +216,7 @@ ResultVal<MessageParameter> AppletManager::ReceiveParameter(AppletId app_id) {
 | 
			
		||||
    auto result = GlanceParameter(app_id);
 | 
			
		||||
    if (result.Succeeded()) {
 | 
			
		||||
        // Clear the parameter
 | 
			
		||||
        next_parameter = boost::none;
 | 
			
		||||
        next_parameter = {};
 | 
			
		||||
    }
 | 
			
		||||
    return result;
 | 
			
		||||
}
 | 
			
		||||
@@ -236,7 +236,7 @@ bool AppletManager::CancelParameter(bool check_sender, AppletId sender_appid, bo
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (cancellation_success)
 | 
			
		||||
        next_parameter = boost::none;
 | 
			
		||||
        next_parameter = {};
 | 
			
		||||
 | 
			
		||||
    return cancellation_success;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <array>
 | 
			
		||||
#include <optional>
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <boost/optional.hpp>
 | 
			
		||||
#include "core/hle/kernel/event.h"
 | 
			
		||||
#include "core/hle/result.h"
 | 
			
		||||
#include "core/hle/service/fs/archive.h"
 | 
			
		||||
@@ -143,7 +143,7 @@ public:
 | 
			
		||||
private:
 | 
			
		||||
    /// Parameter data to be returned in the next call to Glance/ReceiveParameter.
 | 
			
		||||
    /// TODO(Subv): Use std::optional once we migrate to C++17.
 | 
			
		||||
    boost::optional<MessageParameter> next_parameter;
 | 
			
		||||
    std::optional<MessageParameter> next_parameter;
 | 
			
		||||
 | 
			
		||||
    static constexpr std::size_t NumAppletSlot = 4;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -206,7 +206,7 @@ void Module::Interface::GetSharedFont(Kernel::HLERequestContext& ctx) {
 | 
			
		||||
    // The shared font has to be relocated to the new address before being passed to the
 | 
			
		||||
    // application.
 | 
			
		||||
    VAddr target_address =
 | 
			
		||||
        Memory::PhysicalToVirtualAddress(apt->shared_font_mem->linear_heap_phys_address).value();
 | 
			
		||||
        *Memory::PhysicalToVirtualAddress(apt->shared_font_mem->linear_heap_phys_address);
 | 
			
		||||
    if (!apt->shared_font_relocated) {
 | 
			
		||||
        BCFNT::RelocateSharedFont(apt->shared_font_mem, target_address);
 | 
			
		||||
        apt->shared_font_relocated = true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user