Replace boost::optional with std::optional where possible
This commit is contained in:
@@ -132,7 +132,7 @@ void HTTP_C::CreateContext(Kernel::HLERequestContext& ctx) {
|
||||
}
|
||||
|
||||
// This command can only be called without a bound session.
|
||||
if (session_data->current_http_context != boost::none) {
|
||||
if (session_data->current_http_context) {
|
||||
LOG_ERROR(Service_HTTP, "Command called with a bound context");
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||
@@ -198,7 +198,7 @@ void HTTP_C::CloseContext(Kernel::HLERequestContext& ctx) {
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT_MSG(session_data->current_http_context == boost::none,
|
||||
ASSERT_MSG(!session_data->current_http_context,
|
||||
"Unimplemented CloseContext on context-bound session");
|
||||
|
||||
auto itr = contexts.find(context_handle);
|
||||
@@ -249,7 +249,7 @@ void HTTP_C::AddRequestHeader(Kernel::HLERequestContext& ctx) {
|
||||
}
|
||||
|
||||
// This command can only be called with a bound context
|
||||
if (session_data->current_http_context == boost::none) {
|
||||
if (!session_data->current_http_context) {
|
||||
LOG_ERROR(Service_HTTP, "Command called without a bound context");
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||
@@ -263,7 +263,7 @@ void HTTP_C::AddRequestHeader(Kernel::HLERequestContext& ctx) {
|
||||
LOG_ERROR(Service_HTTP,
|
||||
"Tried to add a request header on a mismatched session input context={} session "
|
||||
"context={}",
|
||||
context_handle, session_data->current_http_context.get());
|
||||
context_handle, *session_data->current_http_context);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
|
||||
rb.Push(ERROR_STATE_ERROR);
|
||||
rb.PushMappedBuffer(value_buffer);
|
||||
@@ -313,7 +313,7 @@ void HTTP_C::OpenClientCertContext(Kernel::HLERequestContext& ctx) {
|
||||
if (!session_data->initialized) {
|
||||
LOG_ERROR(Service_HTTP, "Command called without Initialize");
|
||||
result = ERROR_STATE_ERROR;
|
||||
} else if (session_data->current_http_context != boost::none) {
|
||||
} else if (session_data->current_http_context) {
|
||||
LOG_ERROR(Service_HTTP, "Command called with a bound context");
|
||||
result = ERROR_NOT_IMPLEMENTED;
|
||||
} else if (session_data->num_client_certs >= 2) {
|
||||
@@ -352,7 +352,7 @@ void HTTP_C::OpenDefaultClientCertContext(Kernel::HLERequestContext& ctx) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (session_data->current_http_context != boost::none) {
|
||||
if (session_data->current_http_context) {
|
||||
LOG_ERROR(Service_HTTP, "Command called with a bound context");
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
|
||||
rb.Push(ERROR_NOT_IMPLEMENTED);
|
||||
|
||||
Reference in New Issue
Block a user